Module org.snmp4j.transport.unix
Package org.snmp4j.transport.unix
Class UnixSocketStreamTransportMapping.ServerThread
java.lang.Object
org.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,UnixSocketStreamTransportMapping.SocketEntry>
org.snmp4j.transport.unix.UnixSocketStreamTransportMapping.ServerThread
- All Implemented Interfaces:
Runnable
,org.snmp4j.util.WorkerTask
- Enclosing class:
UnixSocketStreamTransportMapping
protected class UnixSocketStreamTransportMapping.ServerThread
extends org.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,UnixSocketStreamTransportMapping.SocketEntry>
-
Field Summary
Fields inherited from class org.snmp4j.transport.AbstractTransportServerThread
lastError, pending, selector, serverAddress, ssc, stop, transportMapping
-
Method Summary
Modifier and TypeMethodDescriptionprotected UnixDomainAddress
createIncomingAddress
(SocketChannel socketChannel) createSocketEntry
(UnixDomainAddress address, SocketChannel socketChannel, boolean useClientMode, org.snmp4j.TransportStateReference tmStateReference) protected boolean
initListener
(UnixDomainAddress address, Selector selector) boolean
isStop()
protected SocketChannel
openSocketChannel
(ProtocolFamily family) protected void
protected boolean
readMessage
(SelectionKey sk, SocketChannel socketChannel, UnixDomainAddress incomingAddress, UnixSocketStreamTransportMapping.SocketEntry socketEntry) removeSocketEntry
(UnixDomainAddress incomingAddress) void
run()
void
setStop
(boolean stop) Methods inherited from class org.snmp4j.transport.AbstractTransportServerThread
close, closeChannel, connectChannel, connectSocketToSendMessage, doServer, fireIncrementCounterSessionClose, getSelector, interrupt, join, sendMessage, terminate, writeData, writeMessage
-
Method Details
-
getLastError
-
isStop
public boolean isStop() -
setStop
public void setStop(boolean stop) -
initListener
- Throws:
IOException
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry>
-
readMessage
protected boolean readMessage(SelectionKey sk, SocketChannel socketChannel, UnixDomainAddress incomingAddress, UnixSocketStreamTransportMapping.SocketEntry socketEntry) throws IOException - Specified by:
readMessage
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry> - Throws:
IOException
-
processQueues
protected void processQueues()- Specified by:
processQueues
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry>
-
createSocketEntry
public UnixSocketStreamTransportMapping.SocketEntry createSocketEntry(UnixDomainAddress address, SocketChannel socketChannel, boolean useClientMode, org.snmp4j.TransportStateReference tmStateReference) - Specified by:
createSocketEntry
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry>
-
openSocketChannel
- Specified by:
openSocketChannel
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry> - Throws:
IOException
-
removeSocketEntry
public UnixSocketStreamTransportMapping.SocketEntry removeSocketEntry(UnixDomainAddress incomingAddress) - Specified by:
removeSocketEntry
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry>
-
createIncomingAddress
- Specified by:
createIncomingAddress
in classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress,
UnixSocketStreamTransportMapping.SocketEntry> - Throws:
IOException
-