Package kieker.monitoring.writer.tcp
Class SingleSocketTcpWriter
java.lang.Object
kieker.monitoring.writer.AbstractMonitoringWriter
kieker.monitoring.writer.tcp.SingleSocketTcpWriter
- All Implemented Interfaces:
IRegistryListener<java.lang.String>
public class SingleSocketTcpWriter extends AbstractMonitoringWriter implements IRegistryListener<java.lang.String>
Represents a monitoring writer which serializes records via TCP to a given
host:port.
- Since:
- 1.13
- Author:
- Christian Wulf
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_BUFFERSIZEconfiguration key for the size of thebuffer.static java.lang.StringCONFIG_CONN_TIMEOUT_IN_MSconfiguration key forconnectionTimeoutInMs.static java.lang.StringCONFIG_FLUSHconfiguration key forflush.static java.lang.StringCONFIG_HOSTNAMEconfiguration key for the hostname.static java.lang.StringCONFIG_PORTconfiguration key for the port.static java.lang.StringPREFIXThis writer can be configured by the configuration file "kieker.properties". -
Constructor Summary
Constructors Constructor Description SingleSocketTcpWriter(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
-
PREFIX
public static final java.lang.String PREFIXThis writer can be configured by the configuration file "kieker.properties". For this purpose, it uses this prefix for all configuration keys. -
CONFIG_HOSTNAME
public static final java.lang.String CONFIG_HOSTNAMEconfiguration key for the hostname. -
CONFIG_PORT
public static final java.lang.String CONFIG_PORTconfiguration key for the port. -
CONFIG_BUFFERSIZE
public static final java.lang.String CONFIG_BUFFERSIZEconfiguration key for the size of thebuffer. -
CONFIG_FLUSH
public static final java.lang.String CONFIG_FLUSHconfiguration key forflush. -
CONFIG_CONN_TIMEOUT_IN_MS
public static final java.lang.String CONFIG_CONN_TIMEOUT_IN_MSconfiguration key forconnectionTimeoutInMs.
-
-
Constructor Details
-
SingleSocketTcpWriter
- Throws:
java.io.IOException
-
-
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
-