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.StringCONFIG_EXCHANGENAMEThe name of the configuration property for the AMQP exchange name.static java.lang.StringCONFIG_HEARTBEATThe name of the configuration property for the heartbeat timeout.static java.lang.StringCONFIG_QUEUENAMEThe name of the configuration property for the AMQP queue name.static java.lang.StringCONFIG_URIThe name of the configuration property for the server URI.static byteREGISTRY_RECORD_IDID for registry records.static byteREGULAR_RECORD_IDID for regular records. -
Constructor Summary
Constructors Constructor Description AmqpWriter(Configuration configuration) -
Method Summary
Modifier and Type Method Description voidonNewRegistryEntry(java.lang.String value, int id)This event is fired after a new registry entry was registered.voidonStarting()This event fires when Kieker has been initialized and is ready to monitor.voidonTerminating()This event fires when Kieker has been notified to terminate.voidwriteMonitoringRecord(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.KeyManagementExceptionjava.security.NoSuchAlgorithmExceptionjava.net.URISyntaxExceptionjava.io.IOExceptionjava.util.concurrent.TimeoutException
-
-
Method Details
-
onStarting
public void onStarting()Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has been initialized and is ready to monitor. It is executed by theMonitoringWriterThreadjust before reading the writer queue.- Specified by:
onStartingin classAbstractMonitoringWriter
-
writeMonitoringRecord
Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has received a new record.- Specified by:
writeMonitoringRecordin classAbstractMonitoringWriter
-
onNewRegistryEntry
public void onNewRegistryEntry(java.lang.String value, int id)Description copied from interface:IRegistryListenerThis event is fired after a new registry entry was registered.- Specified by:
onNewRegistryEntryin interfaceIRegistryListener<java.lang.String>- Parameters:
value- valueid- id
-
onTerminating
public void onTerminating()Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has been notified to terminate. It is executed by theMonitoringWriterThreadjust after finishing the writer queue.- Specified by:
onTerminatingin classAbstractMonitoringWriter
-