|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--javax.management.monitor.Monitor
|
+--javax.management.monitor.GaugeMonitor
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:
threshold high notification is sent.
The notify high flag must be set to true
threshold low notification is sent.
The notify low flag must be set to 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 |
observedObjects |
| Constructor Summary | |
GaugeMonitor()
|
|
| Method Summary | |
void |
addObservedObject(ObjectName objectName)
Adds the specified object in the set of observed MBeans. |
protected void |
doMonitor(ObjectName observedObject,
java.lang.Object value)
|
java.lang.Number |
getDerivedGauge(ObjectName observedObject)
Gets the derived gauge for the specified MBean. |
long |
getDerivedGaugeTimeStamp(ObjectName observedObject)
Gets the derived gauge timestamp for the specified MBean. |
boolean |
getDifferenceMode()
Gets the difference mode flag value. |
java.lang.Number |
getHighThreshold()
Gets the high threshold value. |
java.lang.Number |
getLowThreshold()
Gets the low threshold value. |
MBeanNotificationInfo[] |
getNotificationInfo()
Returns a NotificationInfo object contaning the name of the Java class of the notification and the notification types sent. |
boolean |
getNotifyHigh()
Gets the high notification's on/off switch value. |
boolean |
getNotifyLow()
Gets the low notification's on/off switch value. |
void |
setDifferenceMode(boolean value)
Sets the difference mode flag value. |
void |
setNotifyHigh(boolean value)
Sets the high notification's on/off switch value. |
void |
setNotifyLow(boolean value)
Sets the low notification's on/off switch value. |
void |
setThresholds(java.lang.Number highValue,
java.lang.Number lowValue)
Sets the high and the low threshold values. |
void |
start()
|
void |
stop()
|
| Methods inherited from class javax.management.monitor.Monitor |
_start, _stop, containsObservedObject, getGranularityPeriod, getMonitorData, getObservedAttribute, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, sendNotification, setGranularityPeriod, setObservedAttribute |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.management.monitor.MonitorMBean |
containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObjects, isActive, removeObservedObject, setGranularityPeriod, setObservedAttribute |
| Constructor Detail |
public GaugeMonitor()
| Method Detail |
public void start()
start in class Monitorpublic void stop()
stop in class Monitorpublic java.lang.Number getDerivedGauge(ObjectName observedObject)
GaugeMonitorMBean
getDerivedGauge in interface GaugeMonitorMBeanobservedObject - the MBean for which the derived gauge is to be returned
null otherwise.public long getDerivedGaugeTimeStamp(ObjectName observedObject)
GaugeMonitorMBean
getDerivedGaugeTimeStamp in interface GaugeMonitorMBeanobservedObject - the MBean for which the derived gauge timestamp is to be returned
null otherwise.public java.lang.Number getHighThreshold()
GaugeMonitorMBean
getHighThreshold in interface GaugeMonitorMBeanpublic java.lang.Number getLowThreshold()
GaugeMonitorMBean
getLowThreshold in interface GaugeMonitorMBean
public void setThresholds(java.lang.Number highValue,
java.lang.Number lowValue)
throws java.lang.IllegalArgumentException
GaugeMonitorMBean
setThresholds in interface GaugeMonitorMBeanhighValue - The high threshold value.lowValue - The low threshold value.
java.lang.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 boolean getNotifyHigh()
GaugeMonitorMBean
getNotifyHigh in interface GaugeMonitorMBeantrue if the gauge monitor notifies when
exceeding the high threshold, false otherwise.GaugeMonitorMBean.setNotifyHigh(boolean)public void setNotifyHigh(boolean value)
GaugeMonitorMBean
setNotifyHigh in interface GaugeMonitorMBeanvalue - The high notification's on/off switch value.GaugeMonitorMBean.getNotifyHigh()public boolean getNotifyLow()
GaugeMonitorMBean
getNotifyLow in interface GaugeMonitorMBeantrue if the gauge monitor notifies when
exceeding the low threshold, false otherwise.GaugeMonitorMBean.setNotifyLow(boolean)public void setNotifyLow(boolean value)
GaugeMonitorMBean
setNotifyLow in interface GaugeMonitorMBeanvalue - The low notification's on/off switch value.GaugeMonitorMBean.getNotifyLow()public boolean getDifferenceMode()
GaugeMonitorMBean
getDifferenceMode in interface GaugeMonitorMBeantrue if the difference mode is used,
false otherwise.GaugeMonitorMBean.setDifferenceMode(boolean)public void setDifferenceMode(boolean value)
GaugeMonitorMBean
setDifferenceMode in interface GaugeMonitorMBeanvalue - The difference mode flag value.GaugeMonitorMBean.getDifferenceMode()public MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcasterSupport
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class NotificationBroadcasterSupport
protected void doMonitor(ObjectName observedObject,
java.lang.Object value)
doMonitor in class Monitor
public void addObservedObject(ObjectName objectName)
throws java.lang.IllegalArgumentException
MonitorMBean
addObservedObject in interface MonitorMBeanaddObservedObject in class MonitorobjectName - The object to observe.
java.lang.IllegalArgumentException - the specified object is null.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||