blob: 810525e5f84b86ac585d5f548d23242ac946f253 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26package com.sun.jmx.snmp.daemon ;
27
28// JMX imports
29//
30import com.sun.jmx.snmp.SnmpDefinitions;
31import com.sun.jmx.snmp.SnmpVarBindList;
32
33/**
34 * Provides the callback methods that are required to be implemented by the application
35 * when an inform response is received by the agent.
36 * <P>
37 * Each inform request can be provided with an object that implements this callback
38 * interface. An application then uses the SNMP adaptor to start an SNMP inform request,
39 * which marks the request as active. The methods in this callback interface
40 * get invoked when any of the following happens:
41 * <P>
42 * <UL>
43 * <LI> The agent receives the SNMP inform response.
44 * <LI> The agent does not receive any response within a specified time and the number of tries
45 * have exceeded the limit (timeout condition).
46 * <LI> An internal error occurs while processing or parsing the inform request.
47 * </UL>
48 * <p><b>This API is a Sun Microsystems internal API and is subject
49 * to change without notice.</b></p>
50 */
51
52public interface SnmpInformHandler extends SnmpDefinitions {
53
54 /**
55 * This callback is invoked when a manager responds to an SNMP inform request.
56 * The callback should check the error status of the inform request to determine
57 * the kind of response.
58 *
59 * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
60 * @param errStatus The status of the request.
61 * @param errIndex The index in the list that caused the error.
62 * @param vblist The <CODE>Response varBind</CODE> list for the successful request.
63 */
64 public abstract void processSnmpPollData(SnmpInformRequest request, int errStatus, int errIndex, SnmpVarBindList vblist);
65
66 /**
67 * This callback is invoked when a manager does not respond within the
68 * specified timeout value to the SNMP inform request. The number of tries have also
69 * been exhausted.
70 * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
71 */
72 public abstract void processSnmpPollTimeout(SnmpInformRequest request);
73
74 /**
75 * This callback is invoked when any form of internal error occurs.
76 * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
77 * @param errmsg The <CODE>String</CODE> describing the internal error.
78 */
79 public abstract void processSnmpInternalError(SnmpInformRequest request, String errmsg);
80}