|
XMOJO 5 API Docs | ||||||||
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 |
alreadyNotified, dgbTag, OBSERVED_ATTRIBUTE_ERROR_NOTIFIED, OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED, OBSERVED_OBJECT_ERROR_NOTIFIED, RESET_FLAGS_ALREADY_NOTIFIED, RUNTIME_ERROR_NOTIFIED, server |
Constructor Summary | |
GaugeMonitor()
Default Constructor. |
Method Summary | |
java.lang.Number |
getDerivedGauge()
This method gets the value of the derived gauge. |
long |
getDerivedGaugeTimeStamp()
This method gets the value of the derived gauge time stamp.The derived gauge time stamp* is the value(in the nearest miliseconds) when the notification was triggered. |
boolean |
getDifferenceMode()
This method gets the value of the difference mode. |
java.lang.Number |
getHighThreshold()
This method gets the value of the high threshold. |
java.lang.Number |
getLowThreshold()
This method gets the value of the low threshold. |
MBeanNotificationInfo[] |
getNotificationInfo()
This method returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent by the counter monitor. |
boolean |
getNotifyHigh()
This method gets the high notification's on/off switch value. |
boolean |
getNotifyLow()
This method gets the low notification's on/off switch value. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Overriding the preRegister() of MBeanRegistration interface to store the ObjectName locally. |
void |
setDifferenceMode(boolean value)
This method sets the state of the difference mode. |
void |
setNotifyHigh(boolean value)
This method sets the high notification's on/off switch value. |
void |
setNotifyLow(boolean value)
This method sets the low notification's on/off switch value. |
void |
setThresholds(java.lang.Number highValue,
java.lang.Number lowValue)
This method sets the high threshold and low threshold values. |
void |
start()
Starts the Gauge monitor. |
void |
stop()
Stops the Gauge Monitor. |
Methods inherited from class javax.management.monitor.Monitor |
getGranularityPeriod, getObservedAttribute, getObservedObject, isActive, postDeregister, postRegister, preDeregister, setGranularityPeriod, setObservedAttribute, setObservedObject |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, 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 |
getGranularityPeriod, getObservedAttribute, getObservedObject, isActive, setGranularityPeriod, setObservedAttribute, setObservedObject |
Constructor Detail |
public GaugeMonitor()
Method Detail |
public void start()
start
in interface MonitorMBean
start
in class Monitor
public void stop()
stop
in interface MonitorMBean
stop
in class Monitor
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in class Monitor
public java.lang.Number getDerivedGauge()
getDerivedGauge
in interface GaugeMonitorMBean
public long getDerivedGaugeTimeStamp()
getDerivedGaugeTimeStamp
in interface GaugeMonitorMBean
public boolean getDifferenceMode()
getDifferenceMode
in interface GaugeMonitorMBean
public void setDifferenceMode(boolean value)
setDifferenceMode
in interface GaugeMonitorMBean
value
- boolean value representing the state of the difference mode.public java.lang.Number getHighThreshold()
getHighThreshold
in interface GaugeMonitorMBean
public java.lang.Number getLowThreshold()
getLowThreshold
in interface GaugeMonitorMBean
public void setThresholds(java.lang.Number highValue, java.lang.Number lowValue) throws java.lang.IllegalArgumentException
setThresholds
in interface GaugeMonitorMBean
highValue
- - 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()
getNotifyHigh
in interface GaugeMonitorMBean
public void setNotifyHigh(boolean value)
setNotifyHigh
in interface GaugeMonitorMBean
value
- - The high notification's on/off switch value.public boolean getNotifyLow()
getNotifyLow
in interface GaugeMonitorMBean
public void setNotifyLow(boolean value)
setNotifyLow
in interface GaugeMonitorMBean
value
- - The low notification's on/off switch value.public ObjectName preRegister(MBeanServer server, ObjectName name) throws java.lang.Exception
preRegister
in class Monitor
javax.management.monitor.Monitor
server
- - The MBean server in which the monitor MBean will be registered.name
- - The object name of the monitor MBean.-
- java.lang.Exception.
|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |