com.caucho.server.snmp
Class SnmpRequest
java.lang.Object
com.caucho.network.listen.AbstractProtocolConnection
com.caucho.server.snmp.SnmpRequest
- All Implemented Interfaces:
- ProtocolConnection
public class SnmpRequest
- extends AbstractProtocolConnection
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_ERROR
public static final int NO_ERROR
- See Also:
- Constant Field Values
TOO_BIG
public static final int TOO_BIG
- See Also:
- Constant Field Values
NO_SUCH_NAME
public static final int NO_SUCH_NAME
- See Also:
- Constant Field Values
BAD_VALUE
public static final int BAD_VALUE
- See Also:
- Constant Field Values
READ_ONLY
public static final int READ_ONLY
- See Also:
- Constant Field Values
GENERAL_ERROR
public static final int GENERAL_ERROR
- See Also:
- Constant Field Values
SnmpRequest
public SnmpRequest(SocketLink connection,
java.util.TreeMap<java.lang.String,Oid> mibMap,
OctetStringValue community)
init
public void init()
- Initialize the connection. At this point, the current thread is the
connection thread.
- Specified by:
init
in interface ProtocolConnection
- Overrides:
init
in class AbstractProtocolConnection
isWaitForRead
public boolean isWaitForRead()
- Return true if the connection should wait for a read before
handling the request.
startConnection
public void startConnection()
handleRequest
public boolean handleRequest()
throws java.io.IOException
- Handles a new connection. The controlling TcpServer may call
handleConnection again after the connection completes, so
the implementation must initialize any variables for each connection.
- Specified by:
handleRequest
in interface ProtocolConnection
- Specified by:
handleRequest
in class AbstractProtocolConnection
- Throws:
java.io.IOException
checkVersion
protected final void checkVersion(SnmpMessageValue req)
authenticate
protected final void authenticate(SnmpMessageValue req)
sendResponse
protected final void sendResponse(SnmpValue response)
throws java.io.IOException
- Throws:
java.io.IOException
composeResponse
protected final SnmpMessageValue composeResponse(SnmpMessageValue req)
getMBean
protected SnmpValue getMBean(ObjectIdentifierValue objectIdentifier)
getMBeanServer
protected javax.management.MBeanServer getMBeanServer()
handleResume
public boolean handleResume()
throws java.io.IOException
- Resumes processing after a wait.
- Specified by:
handleResume
in interface ProtocolConnection
- Overrides:
handleResume
in class AbstractProtocolConnection
- Throws:
java.io.IOException
onCloseConnection
public void onCloseConnection()
- Handles a close event when the connection is closed.
- Specified by:
onCloseConnection
in interface ProtocolConnection
- Overrides:
onCloseConnection
in class AbstractProtocolConnection
setVersion
public void setVersion(int version)
getMib
public java.util.TreeMap<java.lang.String,Oid> getMib()