KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > agent > mo > jmx > JMXScalarSupport


1 /*_############################################################################
2   _##
3   _## SNMP4J-AgentJMX - JMXScalarSupport.java
4   _##
5   _## Copyright (C) 2006-2007 Frank Fock (SNMP4J.org)
6   _##
7   _## This program is free software; you can redistribute it and/or modify
8   _## it under the terms of the GNU General Public License version 2 as
9   _## published by the Free Software Foundation.
10   _##
11   _## This program is distributed in the hope that it will be useful,
12   _## but WITHOUT ANY WARRANTY; without even the implied warranty of
13   _## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   _## GNU General Public License for more details.
15   _##
16   _## You should have received a copy of the GNU General Public License
17   _## along with this program; if not, write to the Free Software
18   _## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19   _## MA 02110-1301 USA
20   _##
21   _##########################################################################*/

22 package org.snmp4j.agent.mo.jmx;
23
24 import org.snmp4j.smi.OID;
25 import org.snmp4j.smi.Variable;
26
27 /**
28  * The <code>JMXScalarSupport</code> provides the interface between SNMP values
29  * and MBean based instrumentation. A <code>JMXScalarSupport</code> instance
30  * usually supports more than one scalar object.
31  *
32  * @author Frank Fock
33  * @version 1.0
34  */

35 public interface JMXScalarSupport {
36
37   /**
38    * Gets the actual value for the specified object instance and type.
39    * @param scalarInstanceOID
40    * the instance OID of the target object.
41    * @param value
42    * the instance to hold the return value.
43    * @return
44    * zero on success or a SNMP error status value if fetching the value
45    * fails.
46    */

47   int getScalarValue(OID scalarInstanceOID, Variable value);
48
49   /**
50    * Sets the value of the specified object instance and type.
51    * @param scalarInstanceOID
52    * the instance OID of the target object.
53    * @param value
54    * the instance's new value.
55    * @return
56    * zero on success or a SNMP error status value if setting the value
57    * fails.
58    */

59   int setScalarValue(OID scalarInstanceOID, Variable value);
60
61   /**
62    * Checks the value of the specified object instance and type.
63    * @param scalarInstanceOID
64    * the instance OID of the target object.
65    * @param value
66    * the instance's new value.
67    * @return
68    * zero on success or a SNMP error status value if setting the value
69    * fails.
70    */

71   int checkScalarValue(OID scalarInstanceOID, Variable value);
72 }
73
Popular Tags