| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class GaugeMonitor extends Monitor implements GaugeMonitorMBean
Defines a monitor MBean designed to observe the values of a gauge attribute.
A gauge monitor observes an attribute that is continuously variable with time. A gauge monitor sends notifications as follows:
true
.
true
.
If the gauge difference mode is used, the value of the derived
gauge is calculated as the difference between the observed gauge
values for two successive observations.
The derived gauge value (V[t]) is calculated using the following method:
Byte
, Integer
, Short
,
Long
, Float
, Double
).
Field Summary |
---|
Fields inherited from class javax.management.monitor.Monitor |
---|
alreadyNotified, alreadyNotifieds, capacityIncrement, dbgTag, elementCount, OBSERVED_ATTRIBUTE_ERROR_NOTIFIED, OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED, OBSERVED_OBJECT_ERROR_NOTIFIED, RESET_FLAGS_ALREADY_NOTIFIED, RUNTIME_ERROR_NOTIFIED, server |
Constructor Summary | |
---|---|
Default constructor. |
Method Summary | |
---|---|
Number |
Returns the derived gauge of the first object in the set of observed MBeans. |
Number |
getDerivedGauge(ObjectName object) Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, or null otherwise.
|
long |
Gets the derived gauge timestamp of the first object in the set of observed MBeans. |
long |
getDerivedGaugeTimeStamp(ObjectName object) Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or 0 otherwise.
|
boolean |
Gets the difference mode flag value common to all observed MBeans. |
Number |
Gets the high threshold value common to all observed MBeans. |
Number |
Gets the low threshold value common to all observed MBeans. |
MBeanNotificationInfo[] |
Returns a NotificationInfo object containing the
name of the Java class of the notification and the notification
types sent by the gauge monitor.
|
boolean |
Gets the high notification's on/off switch value common to all observed MBeans. |
boolean |
Gets the low notification's on/off switch value common to all observed MBeans. |
void |
setDifferenceMode(boolean value) Sets the difference mode flag value common to all observed MBeans. |
void |
setNotifyHigh(boolean value) Sets the high notification's on/off switch value common to all observed MBeans. |
void |
setNotifyLow(boolean value) Sets the low notification's on/off switch value common to all observed MBeans. |
void |
setThresholds(Number highValue, Number lowValue) Sets the high and the low threshold values common to all observed MBeans. |
void |
start() Starts the gauge monitor. |
void |
stop() Stops the gauge monitor. |
Methods inherited from class javax.management.monitor.Monitor |
---|
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject, start, stop |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GaugeMonitor()
Method Detail |
---|
public synchronized Number getDerivedGauge()
public synchronized Number getDerivedGauge(ObjectName object)
null
otherwise.
getDerivedGauge
in class Monitor
object
- the name of the MBean.public synchronized long getDerivedGaugeTimeStamp()
public synchronized long getDerivedGaugeTimeStamp(ObjectName object)
0
otherwise.
getDerivedGaugeTimeStamp
in class Monitor
object
- the name of the object whose derived gauge
timestamp is to be returned.public synchronized boolean getDifferenceMode()
true
if the difference mode is used,
false
otherwise.public synchronized Number getHighThreshold()
public synchronized Number getLowThreshold()
public MBeanNotificationInfo[] getNotificationInfo()
NotificationInfo
object containing the
name of the Java class of the notification and the notification
types sent by the gauge monitor.
getNotificationInfo
in class NotificationBroadcasterSupport
public synchronized boolean getNotifyHigh()
true
if the gauge monitor notifies when
exceeding the high threshold, false
otherwise.public synchronized boolean getNotifyLow()
true
if the gauge monitor notifies when
exceeding the low threshold, false
otherwise.public synchronized void setDifferenceMode(boolean value)
value
- The difference mode flag value.public synchronized void setNotifyHigh(boolean value)
value
- The high notification's on/off switch value.public synchronized void setNotifyLow(boolean value)
value
- The low notification's on/off switch value.public synchronized void setThresholds(Number highValue, Number lowValue) throws IllegalArgumentException
highValue
- The high threshold value.lowValue
- The low threshold value.IllegalArgumentException
- The specified high/low
threshold is null or the low threshold is greater than the high
threshold or the high threshold and the low threshold are not
of the same type.public synchronized void start()
start
in class Monitor
public synchronized void stop()
stop
in class Monitor
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |