01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package example.jmx.relation;
09:
10: import javax.management.relation.RelationSupportMBean;
11:
12: /**
13: *
14: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
15: */
16:
17: /**
18: * This is the management interface explicitly defined for the "SimpleRelation" standard MBean.
19: * The "SimpleRelation" standard MBean implements this interface
20: * in order to be manageable through a JMX agent.
21: *
22: * The "SimpleRelationMBean" interface shows how to expose for management:
23: * - a read/write attribute (named "State") through its getter and setter methods,
24: * - a read-only attribute (named "NbChanges") through its getter method,
25: * - an operation (named "reset").
26: *
27: * It extends also the RelationSupportMBean interface.
28: */
29: public interface SimpleRelationMBean extends RelationSupportMBean {
30:
31: /**
32: * Getter: set the "State" attribute of the "SimpleRelation" standard MBean.
33: *
34: * @return the current value of the "State" attribute.
35: */
36: public String getState();
37:
38: /**
39: * Setter: set the "State" attribute of the "SimpleRelation" standard MBean.
40: *
41: */
42: public void setState(String s);
43:
44: /**
45: * Getter: get the "NbChanges" attribute of the "SimpleRelation" standard MBean.
46: *
47: * @return the current value of the "NbChanges" attribute.
48: */
49: public Integer getNbChanges();
50:
51: /**
52: * Operation: reset to their initial values the "State" and "NbChanges"
53: * attributes of the "SimpleRelation" standard MBean.
54: */
55: public void reset();
56: }
|