public class TCPClientConnector extends AbstractConnector
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HOSTNAME
Property name for the host name of the record source.
|
static java.lang.String |
PORT
Property name for the port of the record source.
|
configuration, lookupEntityMap
Constructor and Description |
---|
TCPClientConnector(Configuration configuration,
java.util.concurrent.ConcurrentMap<java.lang.Integer,LookupEntity> lookupEntityMap)
Create a TCPClientConnector.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the data stream and socket.
|
IMonitoringRecord |
deserializeNextRecord()
De-serialize an object reading from the input stream.
|
void |
initialize()
Create the connection to a remote service providing records.
|
public static final java.lang.String HOSTNAME
public static final java.lang.String PORT
public TCPClientConnector(Configuration configuration, java.util.concurrent.ConcurrentMap<java.lang.Integer,LookupEntity> lookupEntityMap)
configuration
- Kieker configuration including setup for connectorslookupEntityMap
- IMonitoringRecord constructor and TYPES-array to id mappublic void initialize() throws ConnectorDataTransmissionException
ConnectorDataTransmissionException
- if the given host or IP cannot be found, or an IOException occurspublic void close() throws ConnectorDataTransmissionException
ConnectorDataTransmissionException
- if an IOException occurs during the close operationpublic IMonitoringRecord deserializeNextRecord() throws ConnectorDataTransmissionException, ConnectorEndOfDataException
ConnectorDataTransmissionException
- when a record is received that ID is unknown or the deserialization failsConnectorEndOfDataException
- when the other end hung up or the data stream ends of another reasonCopyright 2017 Kieker Project, http://kieker-monitoring.net