java.lang.Object
org.snmp4j.transport.AbstractTransportServerThread<TcpAddress,DefaultTcpTransportMapping.SocketEntry>
org.snmp4j.transport.DefaultTcpTransportMapping.ServerThread
- All Implemented Interfaces:
Runnable
,WorkerTask
- Enclosing class:
DefaultTcpTransportMapping
protected class DefaultTcpTransportMapping.ServerThread
extends AbstractTransportServerThread<TcpAddress,DefaultTcpTransportMapping.SocketEntry>
-
Field Summary
Fields inherited from class org.snmp4j.transport.AbstractTransportServerThread
pending, selector, serverAddress, ssc, stop, transportMapping
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected TcpAddress
protected DefaultTcpTransportMapping.SocketEntry
createSocketEntry
(TcpAddress address, SocketChannel socketChannel, boolean useClientMode, TransportStateReference tmStateReference) protected SocketChannel
openSocketChannel
(ProtocolFamily family) protected void
protected boolean
readMessage
(SelectionKey sk, SocketChannel readChannel, TcpAddress incomingAddress, DefaultTcpTransportMapping.SocketEntry socketEntry) protected void
readSnmpMessagePayload
(SocketChannel readChannel, TcpAddress incomingAddress, DefaultTcpTransportMapping.SocketEntry entry, ByteBuffer byteBuffer) removeSocketEntry
(TcpAddress incomingAddress) void
run()
Methods inherited from class org.snmp4j.transport.AbstractTransportServerThread
close, closeChannel, connectChannel, connectSocketToSendMessage, doServer, fireIncrementCounterSessionClose, getSelector, interrupt, join, sendMessage, terminate, writeData, writeMessage
-
Field Details
-
buf
protected byte[] buf
-
-
Constructor Details
-
ServerThread
- Throws:
IOException
-
-
Method Details
-
getLastError
-
createSocketEntry
protected DefaultTcpTransportMapping.SocketEntry createSocketEntry(TcpAddress address, SocketChannel socketChannel, boolean useClientMode, TransportStateReference tmStateReference) - Specified by:
createSocketEntry
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry>
-
openSocketChannel
- Specified by:
openSocketChannel
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry> - Throws:
IOException
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry>
-
readMessage
protected boolean readMessage(SelectionKey sk, SocketChannel readChannel, TcpAddress incomingAddress, DefaultTcpTransportMapping.SocketEntry socketEntry) throws IOException - Specified by:
readMessage
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry> - Throws:
IOException
-
processQueues
protected void processQueues()- Specified by:
processQueues
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry>
-
removeSocketEntry
- Specified by:
removeSocketEntry
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry>
-
createIncomingAddress
- Specified by:
createIncomingAddress
in classAbstractTransportServerThread<TcpAddress,
DefaultTcpTransportMapping.SocketEntry> - Throws:
IOException
-
readSnmpMessagePayload
protected void readSnmpMessagePayload(SocketChannel readChannel, TcpAddress incomingAddress, DefaultTcpTransportMapping.SocketEntry entry, ByteBuffer byteBuffer) throws IOException - Throws:
IOException
-