KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)file SnmpStandardMetaServer.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 package com.sun.jmx.snmp.agent;
12
13 // jmx imports
14
//
15
import com.sun.jmx.snmp.SnmpValue;
16 import com.sun.jmx.snmp.SnmpStatusException;
17
18 /**
19  * <p>
20  * This interface defines the methods that must be implemented by an
21  * SNMP metadata object that needs to interact with an
22  * {@link com.sun.jmx.snmp.agent.SnmpStandardObjectServer} object.
23  * </p>
24  * <p>
25  * All these methods are usually generated by <code>mibgen</code> when
26  * run in standard-metadata mode (default).
27  * </p>
28  * <p><b><i>
29  * This interface is used internally between the generated Metadata and
30  * the SNMP runtime and you shouldn't need to worry about it, because
31  * you will never have to use it directly.
32  * </b></i></p>
33  *
34  * <p><b>This API is a Sun Microsystems internal API and is subject
35  * to change without notice.</b></p>
36  **/

37 public interface SnmpStandardMetaServer {
38     /**
39      * Returns the value of the scalar object identified by the given
40      * OID arc.
41      *
42      * @param arc OID arc of the querried scalar object.
43      *
44      * @return The <CODE>SnmpValue</CODE> of the scalar object identified
45      * by <CODE>arc</CODE>.
46      *
47      * @param userData A contextual object containing user-data.
48      * This object is allocated through the <code>
49      * {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
50      * for each incoming SNMP request.
51      *
52      * @exception SnmpStatusException If the arc is not valid, or if
53      * access is denied.
54      *
55      **/

56     public SnmpValue get(long arc, Object JavaDoc userData)
57     throws SnmpStatusException ;
58
59     /**
60      * Sets the value of the scalar object identified by the given
61      * OID arc.
62      *
63      * @param x New value for the scalar object identified by
64      * <CODE>arc</CODE>
65      *
66      * @param arc OID arc of the scalar object whose value is set.
67      *
68      * @return The new <CODE>SnmpValue</CODE> of the scalar object
69      * identified by <CODE>arc</CODE>.
70      *
71      * @param userData A contextual object containing user-data.
72      * This object is allocated through the <code>
73      * {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
74      * for each incoming SNMP request.
75      *
76      * @exception SnmpStatusException If the arc is not valid, or if
77      * access is denied.
78      *
79      **/

80     public SnmpValue set(SnmpValue x, long arc, Object JavaDoc userData)
81     throws SnmpStatusException ;
82
83     /**
84      * Checks that the new desired value of the scalar object identified
85      * by the given OID arc is valid.
86      *
87      * @param x New value for the scalar object identified by
88      * <CODE>arc</CODE>
89      *
90      * @param arc OID arc of the scalar object whose value is set.
91      *
92      * @param userData A contextual object containing user-data.
93      * This object is allocated through the <code>
94      * {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
95      * for each incoming SNMP request.
96      *
97      * @exception SnmpStatusException If the arc is not valid, or if
98      * access is denied, or if the new desired value is not valid.
99      *
100      **/

101     public void check(SnmpValue x, long arc, Object JavaDoc userData)
102     throws SnmpStatusException ;
103
104 }
105
Popular Tags