KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > agent > SnmpMibHandler


1 /*
2  * @(#)file SnmpMibHandler.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 4.23
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
13 package com.sun.jmx.snmp.agent;
14
15
16
17 // java imports
18
//
19
import java.util.Vector JavaDoc;
20 import java.io.IOException JavaDoc;
21
22 // jmx imports
23
//
24
import com.sun.jmx.snmp.SnmpOid;
25 import com.sun.jmx.snmp.SnmpStatusException;
26
27 /**
28  * The logical link between an SNMP MIB and the SNMP communication stack.
29  *
30  * <p><b>This API is a Sun Microsystems internal API and is subject
31  * to change without notice.</b></p>
32  * @version 4.23 12/19/03
33  * @author Sun Microsystems, Inc
34  */

35
36 public interface SnmpMibHandler {
37     
38     /**
39      * Adds a new MIB in the SNMP MIB handler.
40      * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)} and
41      * {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)} and should not be called directly.
42      *
43      * @param mib The MIB to add.
44      *
45      * @return A reference on the SNMP MIB handler.
46      *
47      * @exception IllegalArgumentException If the parameter is null.
48      */

49     public SnmpMibHandler addMib(SnmpMibAgent mib) throws IllegalArgumentException JavaDoc;
50
51 /**
52      * Adds a new MIB in the SNMP MIB handler.
53      *
54      * @param mib The MIB to add.
55      * @param oids The array of oid used to add the mib. Each oid is a root oid for the mib.
56      * @return A reference on the SNMP MIB handler.
57      *
58      * @exception IllegalArgumentException If the parameter is null.
59      *
60      * @since 1.5
61      */

62     public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids) throws IllegalArgumentException JavaDoc;
63     
64     /**
65      * Adds a new contextualized MIB in the SNMP MIB handler.
66      *
67      * @param mib The MIB to add.
68      * @param contextName The MIB context name. If null is passed, will be registered in the default context.
69      *
70      * @return A reference to the SNMP MIB handler.
71      *
72      * @exception IllegalArgumentException If the parameter is null.
73      *
74      * @since 1.5
75      */

76     public SnmpMibHandler addMib(SnmpMibAgent mib, String JavaDoc contextName)
77         throws IllegalArgumentException JavaDoc;
78     
79     /**
80      * Adds a new contextualized MIB in the SNMP MIB handler.
81      *
82      * @param mib The MIB to add.
83      * @param contextName The MIB context name. If null is passed, will be registered in the default context.
84      * @param oids The array of oid used to add the mib. Each oid is a root oid for the mib.
85      *
86      * @return A reference to the SNMP MIB handler.
87      *
88      * @exception IllegalArgumentException If the parameter is null.
89      *
90      * @since 1.5
91      */

92     public SnmpMibHandler addMib(SnmpMibAgent mib, String JavaDoc contextName, SnmpOid[] oids)
93         throws IllegalArgumentException JavaDoc;
94
95     /**
96      * Removes the specified MIB from the SNMP protocol adaptor.
97      * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)} and
98      * {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)} and should not be called directly.
99      *
100      * @param mib The MIB to be removed.
101      *
102      * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
103      * <CODE>false</CODE> otherwise.
104      */

105     public boolean removeMib(SnmpMibAgent mib);
106   /**
107      * Removes the specified MIB from the SNMP protocol adaptor.
108      * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)} and
109      * {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)} and should not be called directly.
110      *
111      * @param mib The MIB to be removed.
112      * @param oids The oid the MIB was previously registered for.
113      * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
114      * <CODE>false</CODE> otherwise.
115      *
116      * @since 1.5
117      */

118     public boolean removeMib(SnmpMibAgent mib, SnmpOid[] oids);
119      /**
120      * Removes the specified MIB from the SNMP protocol adaptor.
121      *
122      * @param mib The MIB to be removed.
123      * @param contextName The context name used at registration time.
124      *
125      * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
126      * <CODE>false</CODE> otherwise.
127      *
128      * @since 1.5
129      */

130     public boolean removeMib(SnmpMibAgent mib, String JavaDoc contextName);
131      /**
132      * Removes the specified MIB from the SNMP protocol adaptor.
133      *
134      * @param mib The MIB to be removed.
135      * @param contextName The context name used at registration time.
136      * @param oids The oid the MIB was previously registered for.
137      * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
138      * <CODE>false</CODE> otherwise.
139      *
140      * @since 1.5
141      */

142     public boolean removeMib(SnmpMibAgent mib, String JavaDoc contextName, SnmpOid[] oids);
143 }
144
Popular Tags