protected class DefaultTcpTransportMapping.ServerThread extends Object implements WorkerTask
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buf |
protected Selector |
selector |
Constructor and Description |
---|
ServerThread() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Throwable |
getLastError() |
void |
interrupt()
Interrupts this task.
|
void |
join()
Waits until this task has been finished.
|
protected boolean |
readMessage(SelectionKey sk,
SocketChannel readChannel,
TcpAddress incomingAddress) |
protected void |
readSnmpMessagePayload(SocketChannel readChannel,
TcpAddress incomingAddress,
org.snmp4j.transport.DefaultTcpTransportMapping.SocketEntry entry,
ByteBuffer byteBuffer) |
void |
run() |
void |
sendMessage(Address address,
byte[] message,
TransportStateReference tmStateReference) |
void |
terminate()
The
WorkerPool might call this method to hint the active
WorkTask instance to complete execution as soon as possible. |
protected byte[] buf
protected Selector selector
public ServerThread() throws IOException
IOException
public Throwable getLastError()
public void sendMessage(Address address, byte[] message, TransportStateReference tmStateReference) throws IOException
IOException
protected boolean readMessage(SelectionKey sk, SocketChannel readChannel, TcpAddress incomingAddress) throws IOException
IOException
protected void readSnmpMessagePayload(SocketChannel readChannel, TcpAddress incomingAddress, org.snmp4j.transport.DefaultTcpTransportMapping.SocketEntry entry, ByteBuffer byteBuffer) throws IOException
IOException
public void close()
public void terminate()
WorkerTask
WorkerPool
might call this method to hint the active
WorkTask
instance to complete execution as soon as possible.terminate
in interface WorkerTask
public void join()
WorkerTask
join
in interface WorkerTask
public void interrupt()
WorkerTask
interrupt
in interface WorkerTask
Thread.interrupt()
Copyright © 2019 SNMP4J.org. All rights reserved.