KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jmx > SimpleStandardMBean


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package jmx;
5
6 /**
7  * This is the management interface explicitly defined for the "SimpleStandard" standard MBean.
8  * The "SimpleStandard" standard MBean implements this interface
9  * in order to be manageable through a JMX agent.
10  *
11  * The "SimpleStandardMBean" interface shows how to expose for management:
12  * - a read/write attribute (named "State") through its getter and setter methods,
13  * - a read-only attribute (named "NbChanges") through its getter method,
14  * - an operation (named "reset").
15  */

16 public interface SimpleStandardMBean {
17
18     /**
19      * Getter: set the "State" attribute of the "SimpleStandard" standard MBean.
20      *
21      * @return the current value of the "State" attribute.
22      */

23     public String JavaDoc getState() ;
24     
25     /**
26      * Setter: set the "State" attribute of the "SimpleStandard" standard MBean.
27      *
28      * @param <VAR>s</VAR> the new value of the "State" attribute.
29      */

30     public void setState(String JavaDoc s) ;
31     
32     /**
33      * Getter: get the "NbChanges" attribute of the "SimpleStandard" standard MBean.
34      *
35      * @return the current value of the "NbChanges" attribute.
36      */

37     public Integer JavaDoc getNbChanges() ;
38     
39     public int getNbChangesInt();
40     
41     public String JavaDoc[] getAllStates();
42     
43     /**
44      * Operation: reset to their initial values the "State" and "NbChanges"
45      * attributes of the "SimpleStandard" standard MBean.
46      */

47     public void reset() ;
48 }
49
Popular Tags