OpenNMS API 1.2.3

org.opennms.netmgt.utils
Class SnmpResponseHandler

java.lang.Object
  extended byorg.opennms.netmgt.utils.SnmpResponseHandler
All Implemented Interfaces:
SnmpHandler

public final class SnmpResponseHandler
extends java.lang.Object
implements SnmpHandler

The SNMP handler used to receive responses from individual sessions. When a response is received that matches a system object identifier request the session is notified.

Author:
Mike Davidson , OpenNMS

Field Summary
private  SnmpVarBind m_result
          The returned object identifier
 
Constructor Summary
SnmpResponseHandler()
           
 
Method Summary
 SnmpVarBind getResult()
          Returns the recovered snmp system object identifier, if any.
 void snmpInternalError(SnmpSession sess, int err, SnmpSyntax obj)
          This method is invoked when an internal error occurs on the SNMP session.
 void snmpReceivedPdu(SnmpSession sess, int command, SnmpPduPacket pkt)
          The method that handles a returned packet from the remote agent.
 void snmpTimeoutError(SnmpSession sess, SnmpSyntax pkt)
          This method is invoked when the session fails to receive a response to a particular packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_result

private SnmpVarBind m_result
The returned object identifier

Constructor Detail

SnmpResponseHandler

public SnmpResponseHandler()
Method Detail

snmpReceivedPdu

public void snmpReceivedPdu(SnmpSession sess,
                            int command,
                            SnmpPduPacket pkt)
The method that handles a returned packet from the remote agent.

Specified by:
snmpReceivedPdu in interface SnmpHandler
Parameters:
sess - The snmp session that received the result.
command - The snmp command.
pkt - The snmp packet that was received.

snmpInternalError

public void snmpInternalError(SnmpSession sess,
                              int err,
                              SnmpSyntax obj)
This method is invoked when an internal error occurs on the SNMP session.

Specified by:
snmpInternalError in interface SnmpHandler
Parameters:
sess - The snmp session that received the result.
err - The err.
obj - The syntax object.

snmpTimeoutError

public void snmpTimeoutError(SnmpSession sess,
                             SnmpSyntax pkt)
This method is invoked when the session fails to receive a response to a particular packet.

Specified by:
snmpTimeoutError in interface SnmpHandler
Parameters:
sess - The snmp session that received the result.
pkt - The snmp packet that was received.

getResult

public SnmpVarBind getResult()
Returns the recovered snmp system object identifier, if any. If one was not returned then a null value is returned to the caller.


OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.