OpenNMS API 1.2.3

org.opennms.protocols.snmp
Class SnmpRequest

java.lang.Object
  extended byorg.opennms.protocols.snmp.SnmpRequest
All Implemented Interfaces:
java.lang.Runnable

class SnmpRequest
extends java.lang.Object
implements java.lang.Runnable

Implements a way to track outstanding SNMP pdu request. The object tracks the pdu, it's sending parameters, the number of times send, and the last time sent.

The SnmpRequest implements the Runnable interface and its run method is invoked by the corresponding SnmpTimer when the request effectively expires. The member m_expires refers the the expiretion of the request and pdu, not to the failed response.

Version:
1.1.1.1
Author:
Brian Weaver , OpenNMS

Field Summary
(package private)  boolean m_expired
          When set the request as a whole has expired and should no longer be process by any methods.
(package private)  SnmpHandler m_handler
          The SnmpHandler to invoke for this request
(package private)  SnmpSyntax m_pdu
          The pdu transemited to the SnmpPeer.
(package private)  SnmpSession m_session
          The session that created this request
(package private)  int m_timesSent
          The number of times this request has been transmitted.
 
Constructor Summary
(package private) SnmpRequest(SnmpSession session, SnmpPduPacket pdu, SnmpHandler handler)
          Used to create an SnmpRequest object.
(package private) SnmpRequest(SnmpSession session, SnmpPduTrap pdu, SnmpHandler handler)
          Used to create an SnmpRequest object.
 
Method Summary
 void run()
          Used to process the timeout of an SnmpRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_session

SnmpSession m_session
The session that created this request


m_pdu

SnmpSyntax m_pdu
The pdu transemited to the SnmpPeer.


m_handler

SnmpHandler m_handler
The SnmpHandler to invoke for this request


m_timesSent

int m_timesSent
The number of times this request has been transmitted.


m_expired

boolean m_expired
When set the request as a whole has expired and should no longer be process by any methods. It is effectively waiting for garbage collection.

Constructor Detail

SnmpRequest

SnmpRequest(SnmpSession session,
            SnmpPduPacket pdu,
            SnmpHandler handler)
Used to create an SnmpRequest object. This constructor sets the fields to their default value along with the passed parameters.

Parameters:
session - The sending session
pdu - The pdu to send to the remote
handler - The handler to invoke!

SnmpRequest

SnmpRequest(SnmpSession session,
            SnmpPduTrap pdu,
            SnmpHandler handler)
Used to create an SnmpRequest object. This constructor sets the fields to their default value along with the passed parameters.

Parameters:
session - The sending session
pdu - The pdu to send to the remote
handler - The handler to invoke!
Method Detail

run

public void run()
Used to process the timeout of an SnmpRequest. The method is invoked by the session timer object. If the request has "expired" then no processing occurs. If the number of retries have exceeded the session parameters then the SnmpHandler's snmpTimeoutError() method is invoked. If an error occurs transmiting the pdu then the snmpInternalError() method is invoked.

Specified by:
run in interface java.lang.Runnable
See Also:
SnmpHandler, SnmpPduRequest, SnmpSession

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.