ServerSocketEntry
public abstract class AbstractSocketEntry extends java.lang.Object implements ServerSocketEntry
Modifier and Type | Field | Description |
---|---|---|
protected long |
lastUse |
|
protected TcpAddress |
peerAddress |
|
protected java.net.Socket |
socket |
Constructor | Description |
---|---|
AbstractSocketEntry(TcpAddress address,
java.net.Socket socket) |
Modifier and Type | Method | Description |
---|---|---|
void |
addMessage(byte[] message) |
|
void |
addRegistration(java.nio.channels.Selector selector,
int opKey) |
|
long |
getLastUse() |
|
java.util.LinkedList<byte[]> |
getMessages() |
|
TcpAddress |
getPeerAddress() |
|
java.net.Socket |
getSocket() |
|
org.snmp4j.transport.SocketTimeout |
getSocketTimeout() |
|
boolean |
hasMessage() |
|
boolean |
isRegistered(int opKey) |
|
int |
nextBusyLoop() |
|
byte[] |
nextMessage() |
|
void |
removeRegistration(java.nio.channels.Selector selector,
int opKey) |
|
void |
resetBusyLoops() |
|
void |
setSocketTimeout(org.snmp4j.transport.SocketTimeout socketTimeout) |
|
abstract java.lang.String |
toString() |
|
void |
used() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
closeSession
protected java.net.Socket socket
protected TcpAddress peerAddress
protected long lastUse
public AbstractSocketEntry(TcpAddress address, java.net.Socket socket)
public void addRegistration(java.nio.channels.Selector selector, int opKey) throws java.nio.channels.ClosedChannelException
addRegistration
in interface ServerSocketEntry
java.nio.channels.ClosedChannelException
public void removeRegistration(java.nio.channels.Selector selector, int opKey) throws java.nio.channels.ClosedChannelException
removeRegistration
in interface ServerSocketEntry
java.nio.channels.ClosedChannelException
public boolean isRegistered(int opKey)
isRegistered
in interface ServerSocketEntry
public long getLastUse()
getLastUse
in interface ServerSocketEntry
public void used()
used
in interface ServerSocketEntry
public java.net.Socket getSocket()
getSocket
in interface ServerSocketEntry
public TcpAddress getPeerAddress()
getPeerAddress
in interface ServerSocketEntry
public java.util.LinkedList<byte[]> getMessages()
getMessages
in interface ServerSocketEntry
public void addMessage(byte[] message)
addMessage
in interface ServerSocketEntry
public byte[] nextMessage()
nextMessage
in interface ServerSocketEntry
public boolean hasMessage()
hasMessage
in interface ServerSocketEntry
public int nextBusyLoop()
public void resetBusyLoops()
public abstract java.lang.String toString()
toString
in class java.lang.Object
public org.snmp4j.transport.SocketTimeout getSocketTimeout()
getSocketTimeout
in interface ServerSocketEntry
public void setSocketTimeout(org.snmp4j.transport.SocketTimeout socketTimeout)
setSocketTimeout
in interface ServerSocketEntry
Copyright © 2018 SNMP4J.org. All rights reserved.