Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
AbstractTcpReader(int port,
int bufferCapacity,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
int |
getPort() |
protected abstract boolean |
onBufferReceived(ByteBuffer buffer) |
void |
run() |
void |
terminate() |
public AbstractTcpReader(int port, int bufferCapacity, org.slf4j.Logger logger)
protected abstract boolean onBufferReceived(ByteBuffer buffer)
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.
public void terminate()
public int getPort()
Copyright © 2015–2020. All rights reserved.