KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > webjmx > example > SimpleStandardMBean


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

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

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

26     public void setState(String JavaDoc s) ;
27     /**
28      * Getter: set the "Type" attribute of the "SimpleStandard" standard MBean.
29      * @return the current value of the "Type" attribute.
30      */

31     public SimpleStandardType getType() ;
32     
33     /**
34      * Setter: set the "Type" attribute of the "SimpleStandard" standard MBean.
35      * @param <VAR>s</VAR> the new value of the "Type" attribute.
36      */

37     public void setType(SimpleStandardType t) ;
38     
39     /**
40      * Getter: get the "NbChanges" attribute of the "SimpleStandard" standard MBean.
41      * @return the current value of the "NbChanges" attribute.
42      */

43     public Integer JavaDoc getNbChanges() ;
44     
45     /**
46      * Operation: reset to their initial values the "State" and "NbChanges"
47      * attributes of the "SimpleStandard" standard MBean.
48      */

49     public void reset() ;
50     
51     /**
52      * Operation: reset to initial value "NbChanges" and set a new value for "State"
53      * attributes of the "SimpleStandard" standard MBean.
54      * @param startState
55      */

56     public void reset(String JavaDoc startState) ;
57 }
58
Popular Tags