snmp.message.handler
Class SnmpGetRequestHandler
java.lang.Object
|
+--snmp.message.handler.DefaultSnmpRequestHandler
|
+--snmp.message.handler.SnmpGetRequestHandler
- All Implemented Interfaces:
- java.util.EventListener, SnmpMessageHandler, SnmpRequestHandler, SnmpSessionEventListener
- public class SnmpGetRequestHandler
- extends DefaultSnmpRequestHandler
This class handles the SNMP GetRequest-PDU. It firstly checks
the PDU to see if each OID is defined in the MIB database. If there is
no error, it then retrieves the object value from the MBean for each OID
in the PDU and finally replies to the requesting manager.
- Version:
- $Revision: 0.1 $ $Date: 2004/03/09 06:03:49 $
- Author:
- Scott Cheng
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
private static SnmpGetRequestHandler instance
SnmpGetRequestHandler
private SnmpGetRequestHandler()
- Constructs the SnmpGetRequestHandler object
handleSession
public void handleSession(SnmpSessionEvent event)
- Invoked to handle the session when the SNMP PDU is "GetRequest-PDU".
- Parameters:
event
- The SnmpSessionEvent object
getHandlerType
public int getHandlerType()
- Gets the type of the handler.
- Returns:
- The handler type
handleGet
private void handleGet(SnmpSessionEvent event)
throws SnmpException
SnmpException
checkError
private boolean checkError(SnmpSession session)
throws SnmpException
SnmpException
getInstance
public static SnmpGetRequestHandler getInstance()
- Gets the singleton object of the SnmpGetRequestHandler.
- Returns:
- The singleton object of the SnmpGetRequestHandler