01: package example;
02:
03: /**
04: * Implements a resource which is a plain-old bean, which exposes
05: * the <code>getData()</code> method as a JMX-managed attribute.
06: */
07: public class Basic implements BasicMBean {
08: /**
09: * The sample data param.
10: */
11: private String _data = "default";
12:
13: /**
14: * Sets the value.
15: */
16: public void setData(String data) {
17: _data = data;
18: }
19:
20: /**
21: * Gets the value.
22: */
23: public String getData() {
24: return _data;
25: }
26:
27: /**
28: * Returns a printable version of the resource.
29: */
30: public String toString() {
31: return "Basic[" + _data + "]";
32: }
33: }
|