| Commit in servicemix/base/src/main/java/org/servicemix/components/jmx on MAIN | |||
| CounterMonitorComponent.java | +114 | -2 | 1.1 -> 1.2 |
added property methods
servicemix/base/src/main/java/org/servicemix/components/jmx
diff -u -r1.1 -r1.2 --- CounterMonitorComponent.java 23 Sep 2005 10:48:49 -0000 1.1 +++ CounterMonitorComponent.java 23 Sep 2005 10:51:03 -0000 1.2 @@ -37,7 +37,7 @@
/** * A JMX Counter Monitor as a Component to enable firing notifications *
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class CounterMonitorComponent extends ComponentSupport implements NotificationListener{
private static final Log log = LogFactory.getLog(ComponentSupport.class);
@@ -45,7 +45,7 @@
private ObjectName ourName;
private String observedObjectName;
private String attributeName;
- private long granularityPeriod;
+ private long granularityPeriod =5000;
private Number threshold;
private Number offset;
private MBeanServer mbeanServer;
@@ -156,5 +156,117 @@
if(offset == null){
throw new DeploymentException("offset is null");
}
+ }
+
+ /**
+ * @return Returns the attributeName.
+ */
+ public String getAttributeName(){
+ return attributeName;
+ }
+
+ /**
+ * @param attributeName The attributeName to set.
+ */
+ public void setAttributeName(String attributeName){
+ this.attributeName = attributeName;
+ }
+
+ /**
+ * @return Returns the counterMonitor.
+ */
+ public CounterMonitor getCounterMonitor(){
+ return counterMonitor;
+ }
+
+ /**
+ * @param counterMonitor The counterMonitor to set.
+ */
+ public void setCounterMonitor(CounterMonitor counterMonitor){
+ this.counterMonitor = counterMonitor;
+ }
+
+ /**
+ * @return Returns the granularityPeriod.
+ */
+ public long getGranularityPeriod(){
+ return granularityPeriod;
+ }
+
+ /**
+ * @param granularityPeriod The granularityPeriod to set.
+ */
+ public void setGranularityPeriod(long granularityPeriod){
+ this.granularityPeriod = granularityPeriod;
+ }
+
+ /**
+ * @return Returns the mbeanServer.
+ */
+ public MBeanServer getMbeanServer(){
+ return mbeanServer;
+ }
+
+ /**
+ * @param mbeanServer The mbeanServer to set.
+ */
+ public void setMbeanServer(MBeanServer mbeanServer){
+ this.mbeanServer = mbeanServer;
+ }
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName(){
+ return name;
+ }
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name){
+ this.name = name;
+ }
+
+ /**
+ * @return Returns the observedObjectName.
+ */
+ public String getObservedObjectName(){
+ return observedObjectName;
+ }
+
+ /**
+ * @param observedObjectName The observedObjectName to set.
+ */
+ public void setObservedObjectName(String observedObjectName){
+ this.observedObjectName = observedObjectName;
+ }
+
+ /**
+ * @return Returns the offset.
+ */
+ public Number getOffset(){
+ return offset;
+ }
+
+ /**
+ * @param offset The offset to set.
+ */
+ public void setOffset(Number offset){
+ this.offset = offset;
+ }
+
+ /**
+ * @return Returns the threshold.
+ */
+ public Number getThreshold(){
+ return threshold;
+ }
+
+ /**
+ * @param threshold The threshold to set.
+ */
+ public void setThreshold(Number threshold){
+ this.threshold = threshold;
} }
