|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface lists methods that can be used to create and destroy requests. These methods help to start a request with just one method call.
For every kind of method, there are two types. One that accepts a
SnmpPeer object and another that does not require it,
meaning that the implementation will use a default peer object.
SnmpVar,
SnmpVarbindList,
SnmpParameters,
SnmpPeer,
SnmpRequest| Method Summary | |
SnmpRequest |
snmpGet(SnmpHandlerIf cb,
SnmpVarbindList vblst)
Performs a single SNMP get request on the varbind list. |
SnmpRequest |
snmpGet(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst)
Performs a single SNMP get request on the varbind list. |
SnmpRequest |
snmpGetBulk(SnmpHandlerIf cb,
SnmpVarbindList vblst,
int nonRepeat,
int maxRepeat)
Performs a single SNMP getbulk request on the varbind list. |
SnmpRequest |
snmpGetBulk(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
int nonRepeat,
int maxRepeat)
Performs a single SNMP getbulk request on the varbind list. |
SnmpRequest |
snmpGetNext(SnmpHandlerIf cb,
SnmpVarbindList vblst)
Performs a single SNMP getnext request on the varbind list. |
SnmpRequest |
snmpGetNext(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst)
Performs a single SNMP getnext request on the varbind list. |
SnmpRequest |
snmpGetNextPoll(SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. |
SnmpRequest |
snmpGetNextPoll(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. |
SnmpRequest |
snmpGetPoll(SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. |
SnmpRequest |
snmpGetPoll(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. |
SnmpRequest |
snmpSet(SnmpHandlerIf cb,
SnmpVarbindList vblst)
Performs a single SNMP set request on the peer for the
specified varbind list. |
SnmpRequest |
snmpSet(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst)
Performs a single SNMP set request on the peer for the
specified varbind list. |
SnmpRequest |
snmpWalkUntil(SnmpHandlerIf cb,
SnmpVarbindList vblst,
SnmpOid key)
Walks through the lexicographic ordering of the agent MIB. |
SnmpRequest |
snmpWalkUntil(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
SnmpOid key)
Walks through the lexicographic ordering of the agent MIB. |
| Method Detail |
public SnmpRequest snmpGet(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst)
throws SnmpStatusException
get request on the varbind list.
When the command completes, the appropriate callback method is invoked.peer - The SNMP peer object.cb - The callback that gets invoked when request is complete.vblst - A list of SNMP varbinds.
public SnmpRequest snmpGet(SnmpHandlerIf cb,
SnmpVarbindList vblst)
throws SnmpStatusException
get request on the varbind list.
Uses the default peer setup for the session.cb - The callback that is invoked when the request completes.vblst - The list of SNMP varbinds.
public SnmpRequest snmpGetNext(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst)
throws SnmpStatusException
getnext request on the varbind list.
When the command completes, the appropriate callback method is invoked.peer - The SNMP peer object.cb - The callback that is invoked when a request is complete.vblst - A list of SNMP varbinds.
public SnmpRequest snmpGetNext(SnmpHandlerIf cb,
SnmpVarbindList vblst)
throws SnmpStatusException
getnext request on the varbind list.
Uses the default peer setup for the session.cb - The callback that is invoked when a request is complete.vblst - A list of SNMP varbinds.
public SnmpRequest snmpGetBulk(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
int nonRepeat,
int maxRepeat)
throws SnmpStatusException
getbulk request on the varbind list.
When the command completes, the appropriate callback method is invoked.peer - The SNMP peer object.cb - The callback that is invoked when a request is complete.vblst - A list of SNMP varbinds.nonRepeat - The number of varbind to get one time.maxRepeat - The number of repetition for varbind to get multiple time.
public SnmpRequest snmpGetBulk(SnmpHandlerIf cb,
SnmpVarbindList vblst,
int nonRepeat,
int maxRepeat)
throws SnmpStatusException
getbulk request on the varbind list.
Uses the default peer setup for the session.cb - The callback that is invoked when a request is complete.vblst - A list of SNMP varbinds.nonRepeat - The number of varbind to get one time.maxRepeat - The number of repetition for varbind to get multiple time.
public SnmpRequest snmpSet(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst)
throws SnmpStatusException
set request on the peer for the
specified varbind list. Because retries on set
operations are not performed, the user needs to specify the timeout value
within which a response is requested.peer - The SNMP peer object.cb - The callback that is invoked when request is complete.vblst - A list of SNMP varbinds.
public SnmpRequest snmpSet(SnmpHandlerIf cb,
SnmpVarbindList vblst)
throws SnmpStatusException
set request on the peer for the
specified varbind list.
Uses the default peer setup for the session.cb - The callback that is invoked when request is complete.vblst - A list of SNMP varbinds.
public SnmpRequest snmpGetPoll(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
throws SnmpStatusException
varbind list.
It does a SNMP get request on the varbind list.
After each poll, the appropriate callback method is invoked.peer - The SNMP peer object.cb - The callback that is invoked when request is complete.vblst - A list of SNMP varbinds.intrvl - The frequency of polling.
public SnmpRequest snmpGetPoll(SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
throws SnmpStatusException
varbind list.
Uses the default peer setup for the session.cb - The callback that is invoked when request is complete.vblst - A list of SNMP varbinds.intrvl - The frequency of polling.
public SnmpRequest snmpGetNextPoll(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
throws SnmpStatusException
varbind list.
It saves the original varbind list that is used during each poll.
It performs an SNMP getnext request on the saved original
varbind list and provides the response to the user via the callback
mechanism.
This method is similar to snmpGetPoll except that it uses
getnext on the original varbind list instead of
get.peer - The SNMP peer object.cb - The callback that is invoked when request is complete.vblst - A list of SNMP varbinds.intrvl - The frequency of polling.
public SnmpRequest snmpGetNextPoll(SnmpHandlerIf cb,
SnmpVarbindList vblst,
int intrvl)
throws SnmpStatusException
varbind list.
Uses the default peer setup for the session.cb - The callback that is invoked when request is complete.vblst - A list of SNMP varbinds.intrvl - The frequency of polling.
public SnmpRequest snmpWalkUntil(SnmpPeer peer,
SnmpHandlerIf cb,
SnmpVarbindList vblst,
SnmpOid key)
throws SnmpStatusException
varbind list and continues until the OID key
specified as a parameter is no longer a subset of the first variable in the
response varbind list or an error occurred.
Typically, this feature is used to walk an arbitrary table and obtain
all rows satisfying a specific condition. The condition may be
a specific instance combination for a MIB variable or a MIB variable
OID entry object.
String var[] = {"ifDescr", "ifSpeed" } ;
vblst = new SnmpVarbindList(var) ;
snmpWalkUntil(vblst, new SnmpOid("ifIndex")) ;
This example walks through the interface table and get all the rows
in ifTable.
snmpWalkUntil(vblst, new SnmpOid(".1.3")) ;
This example walks through the entire agent MIB starting at ifDescr
and ifSpeed.peer - The peer object to talk to.cb - The callback that is invoked when the request completes.vblst - The list from SnmpVarbindList.key - Condition key that must be a subset of the first variable in
the response SnmpVarbindList. Walk terminates if this condition is false.
public SnmpRequest snmpWalkUntil(SnmpHandlerIf cb,
SnmpVarbindList vblst,
SnmpOid key)
throws SnmpStatusException
cb - The callback that is invoked when the request completes.vblst - The list from SnmpVarbindList.key - Condition key that must be a subset of the first variable in
the response SnmpVarbindList. Walk terminates if this condition is false.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||