All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.jaw.snmp.manager.SnmpHandlerIf

public interface SnmpHandlerIf
extends SnmpDefinitions
This interface provides the callback methods that are required to be implemented by the application. An application creates one or more sessions to perform one or many SNMP operations in the form of requests.

Each request is provided with an object that implements this callback interface. An application then uses the session to start an SNMP request, which marks the request as active. The methods in this callback interface get invoked when any of the following happens:

The agent responds to the SNMP request.
The agent does not respond within a specified time and the retries have exceeded the limit. (Timeout Condition).
Some internal error happens while processing or parsing the request.

Typically, an application would save the response SnmpVarbindList into its own data structure for further processing, or or start another SNMP operation that may be a logical succession (for example, perform a SnmpSet first and then start SnmpGet for results).

See Also:
SnmpPeer, SnmpRequest

Method Index

 o processSnmpInternalError(SnmpRequest, String)
This callback is invoked when any form of internal error occurs during processing the session.
 o processSnmpPollData(SnmpRequest, int, int, SnmpVarbindList)
This callback is invoked when a peer responds to an SNMP request.
 o processSnmpPollTimeout(SnmpRequest)
This callback is invoked when a peer does not respond within the specified timeout value to the SNMP request.

Methods

 o processSnmpPollData
 public abstract void processSnmpPollData(SnmpRequest request,
                                          int errStatus,
                                          int errIndex,
                                          SnmpVarbindList vblist)
This callback is invoked when a peer responds to an SNMP request. The callback should check the error status of the session to determine the kind of response. These response methods are invoked by the session's dispatcher.

Parameters:
request - SnmpRequest associated with this callback.
errStatus - The status of the request.
errIndex - The index in the list that caused the error.
vblist - The Response varbind list for the successful request.
 o processSnmpPollTimeout
 public abstract void processSnmpPollTimeout(SnmpRequest request)
This callback is invoked when a peer does not respond within the specified timeout value to the SNMP request. Retries have also been exhausted.

Parameters:
request - SnmpRequest associated with this callback.
 o processSnmpInternalError
 public abstract void processSnmpInternalError(SnmpRequest request,
                                               String errmsg)
This callback is invoked when any form of internal error occurs during processing the session.

Parameters:
request - SnmpRequest associated with this callback.
errmsg - String describing the internal error.

All Packages  Class Hierarchy  This Package  Previous  Next  Index