KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > daemon > SnmpInformHandler


1 /*
2  * @(#)file SnmpInformHandler.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.6
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12 package com.sun.jmx.snmp.daemon ;
13
14 // JMX imports
15
//
16
import com.sun.jmx.snmp.SnmpDefinitions;
17 import com.sun.jmx.snmp.SnmpVarBindList;
18
19 /**
20  * Provides the callback methods that are required to be implemented by the application
21  * when an inform response is received by the agent.
22  * <P>
23  * Each inform request can be provided with an object that implements this callback
24  * interface. An application then uses the SNMP adaptor to start an SNMP inform request,
25  * which marks the request as active. The methods in this callback interface
26  * get invoked when any of the following happens:
27  * <P>
28  * <UL>
29  * <LI> The agent receives the SNMP inform response.
30  * <LI> The agent does not receive any response within a specified time and the number of tries
31  * have exceeded the limit (timeout condition).
32  * <LI> An internal error occurs while processing or parsing the inform request.
33  * </UL>
34  * <p><b>This API is a Sun Microsystems internal API and is subject
35  * to change without notice.</b></p>
36  */

37
38 public interface SnmpInformHandler extends SnmpDefinitions {
39
40     /**
41      * This callback is invoked when a manager responds to an SNMP inform request.
42      * The callback should check the error status of the inform request to determine
43      * the kind of response.
44      *
45      * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
46      * @param errStatus The status of the request.
47      * @param errIndex The index in the list that caused the error.
48      * @param vblist The <CODE>Response varBind</CODE> list for the successful request.
49      */

50     public abstract void processSnmpPollData(SnmpInformRequest request, int errStatus, int errIndex, SnmpVarBindList vblist);
51
52     /**
53      * This callback is invoked when a manager does not respond within the
54      * specified timeout value to the SNMP inform request. The number of tries have also
55      * been exhausted.
56      * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
57      */

58     public abstract void processSnmpPollTimeout(SnmpInformRequest request);
59
60     /**
61      * This callback is invoked when any form of internal error occurs.
62      * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
63      * @param errmsg The <CODE>String</CODE> describing the internal error.
64      */

65     public abstract void processSnmpInternalError(SnmpInformRequest request, String JavaDoc errmsg);
66 }
67
Popular Tags