All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.snmp.manager.SnmpPollRequest

java.lang.Object
   |
   +----com.sun.jaw.snmp.manager.Request
           |
           +----com.sun.jaw.snmp.manager.SnmpRequest
                   |
                   +----com.sun.jaw.snmp.manager.SnmpPollRequest

public final class SnmpPollRequest
extends SnmpRequest
For Java DMK internal use only.

This class inherits from SnmpRequest and adds functionality to refire request to achieve the desired periodic polling. Any kind of error will cause the polling operation to stop. This is supported only for SnmpGet, SnmpGetNext and SnmpWalk operations. These requests can be created by the convenience methods provided in the SnmpManagerSrvIf interface.

For SnmpGet and SnmpGetNext operations, every polling cycle is started with the original SnmpVarbindList specified. The walk operation is done on the response SnmpVarbindList until the first list meets the specified condition with testOid.

These requests can be configured with options for performance reasons. For example, if the user does not want this request to participate in multilex operation, it could be disabled.

The user needs to explicitly cancel the poll operation to terminate polling operation.

See Also:
SnmpRequest, SnmpSession, SnmpVar, SnmpVarbindList, SnmpParameters, SnmpPeer

Constructor Index

 o SnmpPollRequest(SnmpSession, SnmpPeer, SnmpHandlerIf, int)
Creates new requests.

Method Index

 o getPollFrequency()
 o setPollFrequency(int)
Sets up the polling frequency.
 o setPollFrequency(int, int)
Sets up the polling frequency.
 o startPoll(SnmpVarbindList, boolean, int)
 o startPoll(SnmpVarbindList, SnmpOid, boolean, int)
 o toString()
Gives a status report of the request.

Constructors

 o SnmpPollRequest
 public SnmpPollRequest(SnmpSession group,
                        SnmpPeer peer,
                        SnmpHandlerIf requestCB,
                        int cmd) throws SnmpStatusException
Creates new requests. This object can be created only by a session object. You must instantiate a SnmpSession object to create a request.

Parameters:
group - SnmpSession object for this request.
peer - SnmpPeer object for this request.
requestCB - Callback interface for the request.
cmd - The SNMP command.
Throws: SnmpStatusException
An error occurred while accessing a MIB node.
See Also:
SnmpPeer, SnmpSession

Methods

 o toString
 public final synchronized String toString()
Gives a status report of the request.

Overrides:
toString in class SnmpRequest
 o setPollFrequency
 public final synchronized void setPollFrequency(int sec,
                                                 int milli)
Sets up the polling frequency.

 o setPollFrequency
 public final synchronized void setPollFrequency(int sec)
Sets up the polling frequency.

 o getPollFrequency
 public synchronized int getPollFrequency()
 o startPoll
 public final synchronized void startPoll(SnmpVarbindList vblst,
                                          boolean copy,
                                          int when) throws SnmpStatusException
Throws: SnmpStatusException
An error occurred while accessing a MIB node.
 o startPoll
 public final synchronized void startPoll(SnmpVarbindList vblst,
                                          SnmpOid key,
                                          boolean copy,
                                          int when) throws SnmpStatusException
Throws: SnmpStatusException
An error occurred while accessing a MIB node.

All Packages  Class Hierarchy  This Package  Previous  Next  Index