- 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.Socket
socket
-
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 void
addMessage(byte[] message)
void
addRegistration(java.nio.channels.Selector selector, int opKey)
java.util.LinkedList<byte[]>
getMessages()
java.net.Socket
getSocket()
boolean
hasMessage()
boolean
isRegistered(int opKey)
int
nextBusyLoop()
byte[]
nextMessage()
void
removeRegistration(java.nio.channels.Selector selector, int opKey)
void
resetBusyLoops()
abstract java.lang.String
toString()
-
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:
toString
in classjava.lang.Object
-
-