Class TcpRecordReader
java.lang.Object
kieker.monitoring.core.controller.tcp.TcpRecordReader
- All Implemented Interfaces:
java.lang.Runnable
public class TcpRecordReader
extends java.lang.Object
implements java.lang.Runnable
Represents a TCP reader which reads and reconstructs Kieker records from a
single TCP stream.
- Since:
- 1.13
- Author:
- Christian Wulf (chw)
-
Constructor Summary
Constructors Constructor Description TcpRecordReader(int port, int bufferCapacity, org.slf4j.Logger logger, boolean respawn, IRecordReceivedListener listener)
Create single socket reader.TcpRecordReader(int port, int bufferCapacity, org.slf4j.Logger logger, IRecordReceivedListener listener)
Create single socket reader. -
Method Summary
Modifier and Type Method Description int
getPort()
boolean
onBufferReceived(java.nio.ByteBuffer buffer)
void
run()
void
terminate()
Gracefully terminates this TCP reader.
-
Constructor Details
-
TcpRecordReader
public TcpRecordReader(int port, int bufferCapacity, org.slf4j.Logger logger, IRecordReceivedListener listener)Create single socket reader.- Parameters:
port
- port to listen tobufferCapacity
- buffer capacitylogger
- logger to be usedlistener
- listener to trigger on received records
-
TcpRecordReader
public TcpRecordReader(int port, int bufferCapacity, org.slf4j.Logger logger, boolean respawn, IRecordReceivedListener listener)Create single socket reader.- Parameters:
port
- port to listen tobufferCapacity
- buffer capacitylogger
- logger to be usedrespawn
- true when reader should respawn after lost connectionlistener
- listener to trigger on received records
-
-
Method Details
-
run
public void run()- Specified by:
run
in interfacejava.lang.Runnable
-
terminate
public void terminate()Gracefully terminates this TCP reader. -
getPort
public int getPort() -
onBufferReceived
public boolean onBufferReceived(java.nio.ByteBuffer buffer)
-