Kieker 1.8

kieker.tools.bridge.connector.tcp
Class TCPMultiServerConnector

java.lang.Object
  extended by kieker.tools.bridge.connector.AbstractConnector
      extended by kieker.tools.bridge.connector.tcp.TCPMultiServerConnector
All Implemented Interfaces:
IServiceConnector

public class TCPMultiServerConnector
extends AbstractConnector

TCP server connector supporting multiple clients.

Since:
1.8
Author:
Reiner Jung

Field Summary
static String PORT
          Constant holds name for the port property .
 
Constructor Summary
TCPMultiServerConnector(Configuration configuration, ConcurrentMap<Integer,LookupEntity> lookupEntityMap)
          Create a TCPMultiServerConnector.
 
Method Summary
 void close()
          Stop all service threads to handle TCP communication and empty the record queue.
 IMonitoringRecord deserializeNextRecord()
          Implements the deserializeNextRecord interface.
 void initialize()
          Initializes internal queues and an executor pool for communication.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final String PORT
Constant holds name for the port property .

Constructor Detail

TCPMultiServerConnector

public TCPMultiServerConnector(Configuration configuration,
                               ConcurrentMap<Integer,LookupEntity> lookupEntityMap)
Create a TCPMultiServerConnector.

Parameters:
configuration - Kieker configuration including setup for connectors
lookupEntityMap - IMonitoringRecord constructor and TYPES-array to id map
Method Detail

initialize

public void initialize()
                throws ConnectorDataTransmissionException
Initializes internal queues and an executor pool for communication.

Throws:
ConnectorDataTransmissionException - when the server socket cannot be acquired
See Also:
IServiceConnector.initialize()

close

public void close()
           throws ConnectorDataTransmissionException
Stop all service threads to handle TCP communication and empty the record queue.

Throws:
ConnectorDataTransmissionException - if the thread shutdown is interrupted or fails, the graceful wait to empty the queue fails or the queue is not emptied after a waiting period

deserializeNextRecord

public IMonitoringRecord deserializeNextRecord()
                                        throws ConnectorDataTransmissionException,
                                               ConnectorEndOfDataException
Implements the deserializeNextRecord interface. Fetches deserialized data from the recordQeue which is filled by the connection listener threads.

Returns:
one IMonitoringRecord per call
Throws:
ConnectorDataTransmissionException - if the record reading is interrupted
ConnectorEndOfDataException - if end of all data streams are reached

Kieker 1.8

Copyright 2013 Kieker Project, http://kieker-monitoring.net