public class SingleSocketRecordReader extends AbstractTcpReader
logger
Constructor and Description |
---|
SingleSocketRecordReader(int port,
int bufferCapacity,
org.slf4j.Logger logger,
boolean respawn,
IRecordReceivedListener listener)
Create single socket reader.
|
SingleSocketRecordReader(int port,
int bufferCapacity,
org.slf4j.Logger logger,
IRecordReceivedListener listener)
Create single socket reader.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
onBufferReceived(java.nio.ByteBuffer buffer) |
getPort, run, terminate
public SingleSocketRecordReader(int port, int bufferCapacity, org.slf4j.Logger logger, IRecordReceivedListener listener)
port
- port to listen tobufferCapacity
- buffer capacitylogger
- logger to be usedlistener
- listener to trigger on received recordspublic SingleSocketRecordReader(int port, int bufferCapacity, org.slf4j.Logger logger, boolean respawn, IRecordReceivedListener listener)
port
- port to listen tobufferCapacity
- buffer capacitylogger
- logger to be usedrespawn
- true when reader should respawn after lost connectionlistener
- listener to trigger on received recordsprotected boolean onBufferReceived(java.nio.ByteBuffer buffer)
onBufferReceived
in class AbstractTcpReader
buffer
- to be read fromtrue
when there were enough bytes to perform the read operation
false
otherwise. In this case, the buffer is reset, compacted, and filled with new content.
Copyright 2020 Kieker Project, http://kieker-monitoring.net