Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 package org.webjmx.example; 2 3 22 public class SimpleStandard implements SimpleStandardMBean { 23 24 29 public SimpleStandard() 30 { } 31 32 public SimpleStandard(String startState) 33 { 34 state = startState; 35 } 36 37 42 43 47 public String getState() { 48 return state; 49 } 50 51 55 public void setState(String s) { 56 state = s; 57 nbChanges++; 58 } 59 60 64 public Integer getNbChanges() { 65 return new Integer (nbChanges); 66 } 67 68 72 public void reset() { 73 state = "initial state"; 74 nbChanges = 0; 75 nbResets++; 76 type = new SimpleStandardType(); 77 } 78 79 84 public void reset(String startState) { 85 reset(); 86 state = startState; 87 } 88 89 90 95 96 103 public Integer getNbResets() { 104 return new Integer (nbResets); 105 } 106 107 112 public void setType(SimpleStandardType t) 113 { 114 type = t; 115 } 116 117 122 public SimpleStandardType getType() 123 { 124 return type; 125 } 126 127 132 133 private String state = "initial state"; 134 private int nbChanges = 0; 135 private SimpleStandardType type = new SimpleStandardType(); 136 137 138 143 144 private int nbResets = 0; 145 } 146
| Popular Tags
|