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
exitLatch, lastError, pending, selector, serverAddress, shutdown, ssc, stop, transportMapping -
Method Summary
Modifier and TypeMethodDescriptionprotected UnixDomainAddresscreateIncomingAddress(SocketChannel socketChannel) createSocketEntry(UnixDomainAddress address, SocketChannel socketChannel, boolean useClientMode, org.snmp4j.TransportStateReference tmStateReference) protected ServerSocketChannelprotected booleaninitListener(UnixDomainAddress address, Selector selector) booleanisStop()booleanjoin(long timeout) protected SocketChannelopenSocketChannel(ProtocolFamily family) protected voidprotected booleanreadMessage(SelectionKey sk, SocketChannel socketChannel, UnixDomainAddress incomingAddress, UnixSocketStreamTransportMapping.SocketEntry socketEntry) removeSocketEntry(UnixDomainAddress incomingAddress) voidrun()voidsetStop(boolean stop) voidshutdown()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) -
getServerSocketChannel
-
initListener
- Throws:
IOException
-
run
public void run()- Specified by:
runin interfaceRunnable- Specified by:
runin classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>
-
readMessage
protected boolean readMessage(SelectionKey sk, SocketChannel socketChannel, UnixDomainAddress incomingAddress, UnixSocketStreamTransportMapping.SocketEntry socketEntry) throws IOException - Specified by:
readMessagein classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>- Throws:
IOException
-
processQueues
protected void processQueues()- Specified by:
processQueuesin classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>
-
createSocketEntry
public UnixSocketStreamTransportMapping.SocketEntry createSocketEntry(UnixDomainAddress address, SocketChannel socketChannel, boolean useClientMode, org.snmp4j.TransportStateReference tmStateReference) - Specified by:
createSocketEntryin classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>
-
openSocketChannel
- Specified by:
openSocketChannelin classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>- Throws:
IOException
-
removeSocketEntry
public UnixSocketStreamTransportMapping.SocketEntry removeSocketEntry(UnixDomainAddress incomingAddress) - Specified by:
removeSocketEntryin classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>
-
createIncomingAddress
- Specified by:
createIncomingAddressin classorg.snmp4j.transport.AbstractTransportServerThread<UnixDomainAddress, UnixSocketStreamTransportMapping.SocketEntry>- Throws:
IOException
-
shutdown
public void shutdown() -
join
- Throws:
InterruptedException
-