Package kieker.monitoring.writer.amqp
Class AmqpWriter
java.lang.Object
kieker.monitoring.writer.AbstractMonitoringWriter
kieker.monitoring.writer.amqp.AmqpWriter
- All Implemented Interfaces:
IRegistryListener<java.lang.String>
public class AmqpWriter extends AbstractMonitoringWriter implements IRegistryListener<java.lang.String>
Monitoring record writer which sends records using the AMQP protocol to a message queue.
- Since:
- 1.12
- Author:
- Holger Knoche, Christian Wulf
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_EXCHANGENAME
The name of the configuration property for the AMQP exchange name.static java.lang.String
CONFIG_HEARTBEAT
The name of the configuration property for the heartbeat timeout.static java.lang.String
CONFIG_QUEUENAME
The name of the configuration property for the AMQP queue name.static java.lang.String
CONFIG_URI
The name of the configuration property for the server URI.static byte
REGISTRY_RECORD_ID
ID for registry records.static byte
REGULAR_RECORD_ID
ID for regular records. -
Constructor Summary
Constructors Constructor Description AmqpWriter(Configuration configuration)
-
Method Summary
Modifier and Type Method Description void
onNewRegistryEntry(java.lang.String value, int id)
This event is fired after a new registry entry was registered.void
onStarting()
This event fires when Kieker has been initialized and is ready to monitor.void
onTerminating()
This event fires when Kieker has been notified to terminate.void
writeMonitoringRecord(IMonitoringRecord monitoringRecord)
This event fires when Kieker has received a new record.
-
Field Details
-
REGISTRY_RECORD_ID
public static final byte REGISTRY_RECORD_IDID for registry records.- See Also:
- Constant Field Values
-
REGULAR_RECORD_ID
public static final byte REGULAR_RECORD_IDID for regular records.- See Also:
- Constant Field Values
-
CONFIG_URI
public static final java.lang.String CONFIG_URIThe name of the configuration property for the server URI. -
CONFIG_EXCHANGENAME
public static final java.lang.String CONFIG_EXCHANGENAMEThe name of the configuration property for the AMQP exchange name. -
CONFIG_QUEUENAME
public static final java.lang.String CONFIG_QUEUENAMEThe name of the configuration property for the AMQP queue name. -
CONFIG_HEARTBEAT
public static final java.lang.String CONFIG_HEARTBEATThe name of the configuration property for the heartbeat timeout.
-
-
Constructor Details
-
AmqpWriter
public AmqpWriter(Configuration configuration) throws java.security.KeyManagementException, java.security.NoSuchAlgorithmException, java.net.URISyntaxException, java.io.IOException, java.util.concurrent.TimeoutException- Throws:
java.security.KeyManagementException
java.security.NoSuchAlgorithmException
java.net.URISyntaxException
java.io.IOException
java.util.concurrent.TimeoutException
-
-
Method Details
-
onStarting
public void onStarting()Description copied from class:AbstractMonitoringWriter
This event fires when Kieker has been initialized and is ready to monitor. It is executed by theMonitoringWriterThread
just before reading the writer queue.- Specified by:
onStarting
in classAbstractMonitoringWriter
-
writeMonitoringRecord
Description copied from class:AbstractMonitoringWriter
This event fires when Kieker has received a new record.- Specified by:
writeMonitoringRecord
in classAbstractMonitoringWriter
-
onNewRegistryEntry
public void onNewRegistryEntry(java.lang.String value, int id)Description copied from interface:IRegistryListener
This event is fired after a new registry entry was registered.- Specified by:
onNewRegistryEntry
in interfaceIRegistryListener<java.lang.String>
- Parameters:
value
- valueid
- id
-
onTerminating
public void onTerminating()Description copied from class:AbstractMonitoringWriter
This event fires when Kieker has been notified to terminate. It is executed by theMonitoringWriterThread
just after finishing the writer queue.- Specified by:
onTerminating
in classAbstractMonitoringWriter
-