|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | 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).
| 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)
GaugeMonitorMBeangetDerivedGauge in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeanobject - the MBean for which the derived gauge is to be returnednull otherwise.public long getDerivedGaugeTimeStamp(ObjectName observedObject)
GaugeMonitorMBeangetDerivedGaugeTimeStamp in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeanobject - the MBean for which the derived gauge timestamp is to be returnednull otherwise.public java.lang.Number getHighThreshold()
GaugeMonitorMBeangetHighThreshold in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeanpublic java.lang.Number getLowThreshold()
GaugeMonitorMBeangetLowThreshold in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBean
public void setThresholds(java.lang.Number highValue,
java.lang.Number lowValue)
throws java.lang.IllegalArgumentException
GaugeMonitorMBeansetThresholds in interface GaugeMonitorMBeanjavax.management.monitor.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()
GaugeMonitorMBeangetNotifyHigh in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeantrue if the gauge monitor notifies when
exceeding the high threshold, false otherwise.GaugeMonitorMBean.setNotifyHigh(boolean)public void setNotifyHigh(boolean value)
GaugeMonitorMBeansetNotifyHigh in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeanvalue - The high notification's on/off switch value.GaugeMonitorMBean.getNotifyHigh()public boolean getNotifyLow()
GaugeMonitorMBeangetNotifyLow in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeantrue if the gauge monitor notifies when
exceeding the low threshold, false otherwise.GaugeMonitorMBean.setNotifyLow(boolean)public void setNotifyLow(boolean value)
GaugeMonitorMBeansetNotifyLow in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeanvalue - The low notification's on/off switch value.GaugeMonitorMBean.getNotifyLow()public boolean getDifferenceMode()
GaugeMonitorMBeangetDifferenceMode in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeantrue if the difference mode is used,
false otherwise.GaugeMonitorMBean.setDifferenceMode(boolean)public void setDifferenceMode(boolean value)
GaugeMonitorMBeansetDifferenceMode in interface GaugeMonitorMBeanjavax.management.monitor.GaugeMonitorMBeanvalue - The difference mode flag value.GaugeMonitorMBean.getDifferenceMode()public MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcasterSupportgetNotificationInfo 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
MonitorMBeanaddObservedObject in interface MonitorMBeanaddObservedObject in class Monitorjavax.management.monitor.MonitorMBeanobject - The object to observe.java.lang.IllegalArgumentException - the specified object is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||