com.sun.jaw.snmp.manager
Interface SnmpManagerSrvIf

All Known Implementing Classes:
SnmpSession

public abstract interface SnmpManagerSrvIf

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.

See Also:
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

snmpGet

public SnmpRequest snmpGet(SnmpPeer peer,
                           SnmpHandlerIf cb,
                           SnmpVarbindList vblst)
                    throws SnmpStatusException
Performs a single SNMP get request on the varbind list. When the command completes, the appropriate callback method is invoked.
Parameters:
peer - The SNMP peer object.
cb - The callback that gets invoked when request is complete.
vblst - A list of SNMP varbinds.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGet

public SnmpRequest snmpGet(SnmpHandlerIf cb,
                           SnmpVarbindList vblst)
                    throws SnmpStatusException
Performs a single SNMP get request on the varbind list. Uses the default peer setup for the session.
Parameters:
cb - The callback that is invoked when the request completes.
vblst - The list of SNMP varbinds.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.

snmpGetNext

public SnmpRequest snmpGetNext(SnmpPeer peer,
                               SnmpHandlerIf cb,
                               SnmpVarbindList vblst)
                        throws SnmpStatusException
Performs a single SNMP getnext request on the varbind list. When the command completes, the appropriate callback method is invoked.
Parameters:
peer - The SNMP peer object.
cb - The callback that is invoked when a request is complete.
vblst - A list of SNMP varbinds.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetNext

public SnmpRequest snmpGetNext(SnmpHandlerIf cb,
                               SnmpVarbindList vblst)
                        throws SnmpStatusException
Performs a single SNMP getnext request on the varbind list. Uses the default peer setup for the session.
Parameters:
cb - The callback that is invoked when a request is complete.
vblst - A list of SNMP varbinds.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetBulk

public SnmpRequest snmpGetBulk(SnmpPeer peer,
                               SnmpHandlerIf cb,
                               SnmpVarbindList vblst,
                               int nonRepeat,
                               int maxRepeat)
                        throws SnmpStatusException
Performs a single SNMP getbulk request on the varbind list. When the command completes, the appropriate callback method is invoked.
Parameters:
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.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetBulk

public SnmpRequest snmpGetBulk(SnmpHandlerIf cb,
                               SnmpVarbindList vblst,
                               int nonRepeat,
                               int maxRepeat)
                        throws SnmpStatusException
Performs a single SNMP getbulk request on the varbind list. Uses the default peer setup for the session.
Parameters:
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.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpSet

public SnmpRequest snmpSet(SnmpPeer peer,
                           SnmpHandlerIf cb,
                           SnmpVarbindList vblst)
                    throws SnmpStatusException
Performs a single SNMP 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.
Parameters:
peer - The SNMP peer object.
cb - The callback that is invoked when request is complete.
vblst - A list of SNMP varbinds.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpSet

public SnmpRequest snmpSet(SnmpHandlerIf cb,
                           SnmpVarbindList vblst)
                    throws SnmpStatusException
Performs a single SNMP set request on the peer for the specified varbind list. Uses the default peer setup for the session.
Parameters:
cb - The callback that is invoked when request is complete.
vblst - A list of SNMP varbinds.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetPoll

public SnmpRequest snmpGetPoll(SnmpPeer peer,
                               SnmpHandlerIf cb,
                               SnmpVarbindList vblst,
                               int intrvl)
                        throws SnmpStatusException
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. It does a SNMP get request on the varbind list. After each poll, the appropriate callback method is invoked.
Parameters:
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.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetPoll

public SnmpRequest snmpGetPoll(SnmpHandlerIf cb,
                               SnmpVarbindList vblst,
                               int intrvl)
                        throws SnmpStatusException
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. Uses the default peer setup for the session.
Parameters:
cb - The callback that is invoked when request is complete.
vblst - A list of SNMP varbinds.
intrvl - The frequency of polling.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetNextPoll

public SnmpRequest snmpGetNextPoll(SnmpPeer peer,
                                   SnmpHandlerIf cb,
                                   SnmpVarbindList vblst,
                                   int intrvl)
                            throws SnmpStatusException
Starts polling the peer at the specified intervals, for the MIB variables in the 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.
Parameters:
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.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpGetNextPoll

public SnmpRequest snmpGetNextPoll(SnmpHandlerIf cb,
                                   SnmpVarbindList vblst,
                                   int intrvl)
                            throws SnmpStatusException
Starts polling the peer at the specified intervals, for the MIB variables in the varbind list. Uses the default peer setup for the session.
Parameters:
cb - The callback that is invoked when request is complete.
vblst - A list of SNMP varbinds.
intrvl - The frequency of polling.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpWalkUntil

public SnmpRequest snmpWalkUntil(SnmpPeer peer,
                                 SnmpHandlerIf cb,
                                 SnmpVarbindList vblst,
                                 SnmpOid key)
                          throws SnmpStatusException
Walks through the lexicographic ordering of the agent MIB. It starts at the specified 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.
Parameters:
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.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.

snmpWalkUntil

public SnmpRequest snmpWalkUntil(SnmpHandlerIf cb,
                                 SnmpVarbindList vblst,
                                 SnmpOid key)
                          throws SnmpStatusException
Walks through the lexicographic ordering of the agent MIB. Uses the default peer setup for the session.
Parameters:
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.
Throws:
SnmpStatusException - You may never get this by using these convenience ftns.
See Also:
How to get response data.