MySnmpCrawler API

snmp.message.handler
Class SnmpGetResponseHandler

java.lang.Object
  |
  +--snmp.message.handler.SnmpGetResponseHandler
All Implemented Interfaces:
java.util.EventListener, SnmpMessageHandler, SnmpSessionEventListener

public class SnmpGetResponseHandler
extends java.lang.Object
implements SnmpMessageHandler

This class provides the required operations to handle SNMP GetResponse-PDU.

Version:
$Revision: 0.1 $ $Date: 2004/03/09 06:03:49 $
Author:
Scott Cheng

Field Summary
private static SnmpGetResponseHandler instance
           
private static int RESPONSE
           
 
Constructor Summary
private SnmpGetResponseHandler()
          Constructs the SnmpGetResponseHandler object
 
Method Summary
 int getHandlerType()
          Gets the type of the handler.
static SnmpGetResponseHandler getInstance()
          Gets the singleton object of the SnmpGetResponseHandler.
private  void handleGetResponse(SnmpSessionEvent event)
           
 void handleSession(SnmpSessionEvent event)
          Invoked to handle the session when the SNMP PDU is "GetResponse-PDU".
 boolean isHandler(int type)
          This method returns true if it is the right listener to handle the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESPONSE

private static int RESPONSE

instance

private static SnmpGetResponseHandler instance
Constructor Detail

SnmpGetResponseHandler

private SnmpGetResponseHandler()
Constructs the SnmpGetResponseHandler object

Method Detail

handleSession

public void handleSession(SnmpSessionEvent event)
Invoked to handle the session when the SNMP PDU is "GetResponse-PDU".

Specified by:
handleSession in interface SnmpSessionEventListener
Parameters:
event - The SnmpSessionEvent object

isHandler

public boolean isHandler(int type)
This method returns true if it is the right listener to handle the message.

Specified by:
isHandler in interface SnmpMessageHandler
Parameters:
type - Type of the operation

getHandlerType

public int getHandlerType()
Gets the type of the handler.

Specified by:
getHandlerType in interface SnmpMessageHandler
Returns:
The handler type

handleGetResponse

private void handleGetResponse(SnmpSessionEvent event)

getInstance

public static SnmpGetResponseHandler getInstance()
Gets the singleton object of the SnmpGetResponseHandler.

Returns:
The singleton object of the SnmpGetResponseHandler

MySnmpCrawler API