java.lang.Runnable
, WorkerTask
protected class DefaultTcpTransportMapping.ServerThread extends AbstractTcpServerThread
Modifier and Type | Field | Description |
---|---|---|
protected byte[] |
buf |
pending, selector, tcpTransportMapping
Constructor | Description |
---|---|
ServerThread() |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
java.lang.Throwable |
getLastError() |
|
void |
interrupt() |
Interrupts this task.
|
void |
join() |
Waits until this task has been finished.
|
protected boolean |
readMessage(java.nio.channels.SelectionKey sk,
java.nio.channels.SocketChannel readChannel,
TcpAddress incomingAddress) |
|
protected void |
readSnmpMessagePayload(java.nio.channels.SocketChannel readChannel,
TcpAddress incomingAddress,
org.snmp4j.transport.DefaultTcpTransportMapping.SocketEntry entry,
java.nio.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. |
closeChannel, connectChannel, writeData
public ServerThread() throws java.io.IOException
java.io.IOException
public java.lang.Throwable getLastError()
public void sendMessage(Address address, byte[] message, TransportStateReference tmStateReference) throws java.io.IOException
java.io.IOException
public void run()
run
in interface java.lang.Runnable
run
in class AbstractTcpServerThread
protected boolean readMessage(java.nio.channels.SelectionKey sk, java.nio.channels.SocketChannel readChannel, TcpAddress incomingAddress) throws java.io.IOException
java.io.IOException
protected void readSnmpMessagePayload(java.nio.channels.SocketChannel readChannel, TcpAddress incomingAddress, org.snmp4j.transport.DefaultTcpTransportMapping.SocketEntry entry, java.nio.ByteBuffer byteBuffer) throws java.io.IOException
java.io.IOException
public void close()
close
in class AbstractTcpServerThread
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
terminate
in class AbstractTcpServerThread
public void join()
WorkerTask
join
in interface WorkerTask
join
in class AbstractTcpServerThread
public void interrupt()
WorkerTask
interrupt
in interface WorkerTask
interrupt
in class AbstractTcpServerThread
Thread.interrupt()
Copyright © 2018 SNMP4J.org. All rights reserved.