com.sun.jaw.snmp.manager
Class 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
, Serialized Form
Fields inherited from class com.sun.jaw.snmp.manager.Request |
retry,
stAborted,
stBase,
stInProgress,
stInternalError,
stNeverUsed,
stReceivedReply,
stResultsAvailable,
stTimeout,
stWaitingForReply,
stWaitingToSend,
timeout |
Method Summary |
int |
getPollFrequency()
Gets the polling frequency. |
void |
setPollFrequency(int sec)
Sets up the polling frequency. |
void |
setPollFrequency(int sec,
int milli)
Sets up the polling frequency. |
java.lang.String |
toString()
Returns the string representation for this SnmpPollRequest . |
Methods inherited from class com.sun.jaw.snmp.manager.SnmpRequest |
allowMultiplex,
cancelRequest,
finalize,
fixPduOnError,
fixTooBigError,
getCommand,
getErrorIndex,
getErrorStatus,
getMaxRetry,
getOptions,
getParam,
getPeer,
getRequestVbList,
getResponseVbList,
getSnmpSession,
isInternalRequest,
notifyClient,
setOptions,
snmpErrorToString,
waitForCompletion |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
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
toString
public final java.lang.String toString()
- Returns the string representation for this
SnmpPollRequest
.
- Returns:
- The string representation.
- Overrides:
- toString in class SnmpRequest
setPollFrequency
public final void setPollFrequency(int sec,
int milli)
- Sets up the polling frequency.
- Parameters:
sec
- The number of seconds.milli
- The number of milliseconds.
setPollFrequency
public final void setPollFrequency(int sec)
- Sets up the polling frequency.
- Parameters:
sec
- The number of seconds.
getPollFrequency
public int getPollFrequency()
- Gets the polling frequency.
- Returns:
- The polling frequency.