1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jelly.tags.jmx;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20
21 /***
22 * A dummy MBean used for the demo
23 *
24 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
25 * @version $Revision: 1.4 $
26 */
27 public class Dummy implements DummyMBean {
28
29 /*** The Log to which logging calls will be made. */
30 private static final Log log = LogFactory.getLog(Dummy.class);
31
32 private String name = "James";
33 private int count;
34
35 public void doSomething() {
36 ++count;
37 log.info("Do something! on: " + this);
38 }
39
40 public String toString() {
41 return super.toString() + "[name=" + name + "]";
42 }
43
44
45
46
47
48 /***
49 * @return int
50 */
51 public int getCount() {
52 return count;
53 }
54
55 /***
56 * @return String
57 */
58 public String getName() {
59 return name;
60 }
61
62 /***
63 * Sets the count.
64 * @param count The count to set
65 */
66 public void setCount(int count) {
67 this.count = count;
68 }
69
70 /***
71 * Sets the name.
72 * @param name The name to set
73 */
74 public void setName(String name) {
75 this.name = name;
76 }
77
78
79 }