Class ValueStatisticsRecorder

All Implemented Interfaces:, StatisticsRecorderMBean, ValueStatisticsRecorderMBean

public class ValueStatisticsRecorder
extends AbstractStatisticsRecorder
implements ValueStatisticsRecorderMBean

ValueStatisticsRecorder records statistics of an attribute based on changes on the variable value. If you want to use you have to explictly set the variable value.

Example usage:

 ObjectName name = new ObjectName("Domain:name=value");
 server.createMBean("", name, null);
 server.invoke(name, "start", null, null);
 // Every time the value is set the statistics are updated
 server.setAttribute(name, "Attribute", new Double(10));

$Revision: 1.5 $

Field Summary
protected  java.lang.Number value
Fields inherited from class
averageValue, count, entries, isActive, isDouble, maxEntries, maximumValue, minimumValue, recordingStart, server
Constructor Summary
Method Summary
 java.lang.Number getValue()
          Returns the recorded value
 void setValue(java.lang.Number value)
          Sets the value to be recorded
 java.lang.String toString()
Methods inherited from class
addEntry, doStart, doStop, getAverage, getEntries, getLogger, getMax, getMaxEntries, getMin, getRecordingStart, isActive, postDeregister, postRegister, preDeregister, preRegister, setMaxEntries, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface
getAverage, getEntries, getMax, getMaxEntries, getMin, getRecordingStart, isActive, setMaxEntries, start, stop

Field Detail


protected java.lang.Number value
Constructor Detail


public ValueStatisticsRecorder()
Method Detail


public void setValue(java.lang.Number value)
Description copied from interface: ValueStatisticsRecorderMBean
Sets the value to be recorded

Specified by:
setValue in interface ValueStatisticsRecorderMBean


public java.lang.Number getValue()
Description copied from interface: ValueStatisticsRecorderMBean
Returns the recorded value

Specified by:
getValue in interface ValueStatisticsRecorderMBean


public java.lang.String toString()

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.