- java.lang.Object
-
- org.snmp4j.transport.AbstractServerSocket<TcpAddress>
-
- org.snmp4j.transport.AbstractSocketEntry
-
- Direct Known Subclasses:
DefaultTcpTransportMapping.SocketEntry
public abstract class AbstractSocketEntry extends AbstractServerSocket<TcpAddress>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.net.Socketsocket
-
Constructor Summary
Constructors Constructor Description AbstractSocketEntry(TcpAddress address, java.net.Socket socket)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddMessage(byte[] message)voidaddRegistration(java.nio.channels.Selector selector, int opKey)java.util.LinkedList<byte[]>getMessages()java.net.SocketgetSocket()booleanhasMessage()booleanisRegistered(int opKey)intnextBusyLoop()byte[]nextMessage()voidremoveRegistration(java.nio.channels.Selector selector, int opKey)voidresetBusyLoops()abstract java.lang.StringtoString()-
Methods inherited from class org.snmp4j.transport.AbstractServerSocket
getLastUse, getPeerAddress, getSocketTimeout, isHandshakeFinished, setHandshakeFinished, setSocketTimeout, used
-
-
-
-
Constructor Detail
-
AbstractSocketEntry
public AbstractSocketEntry(TcpAddress address, java.net.Socket socket)
-
-
Method Detail
-
addRegistration
public void addRegistration(java.nio.channels.Selector selector, int opKey) throws java.nio.channels.ClosedChannelException- Throws:
java.nio.channels.ClosedChannelException
-
removeRegistration
public void removeRegistration(java.nio.channels.Selector selector, int opKey) throws java.nio.channels.ClosedChannelException- Throws:
java.nio.channels.ClosedChannelException
-
isRegistered
public boolean isRegistered(int opKey)
-
getSocket
public java.net.Socket getSocket()
-
getMessages
public java.util.LinkedList<byte[]> getMessages()
-
addMessage
public void addMessage(byte[] message)
-
nextMessage
public byte[] nextMessage()
-
hasMessage
public boolean hasMessage()
-
nextBusyLoop
public int nextBusyLoop()
-
resetBusyLoops
public void resetBusyLoops()
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-