java.lang.Object
javax.management.NotificationBroadcasterSupport
javax.management.monitor.Monitor
javax.management.monitor.GaugeMonitor
- All Implemented Interfaces:
- MBeanRegistration,- GaugeMonitorMBean,- MonitorMBean,- NotificationBroadcaster,- NotificationEmitter
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:
-  if the attribute value is increasing and becomes equal to or
 greater than the high threshold value, a threshold high notificationis sent. The notify high flag must be set totrue.
 Subsequent crossings of the high threshold value do not cause further notifications unless the attribute value becomes equal to or less than the low threshold value.
-  if the attribute value is decreasing and becomes equal to or
 less than the low threshold value, a threshold low notificationis sent. The notify low flag must be set totrue.
 Subsequent crossings of the low threshold value do not cause further notifications unless the attribute value becomes equal to or greater than the high threshold value.
 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:
 
- V[t] = gauge[t] - gauge[t-GP]
Byte, Integer, Short,
 Long, Float, Double).- Since:
- 1.5
- 
Field SummaryFields declared in class javax.management.monitor.MonitoralreadyNotified, 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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated.getDerivedGauge(ObjectName object) Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, ornullotherwise.longDeprecated.As of JMX 1.2, replaced bygetDerivedGaugeTimeStamp(ObjectName)longgetDerivedGaugeTimeStamp(ObjectName object) Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or0otherwise.booleanGets the difference mode flag value common to all observed MBeans.Gets the high threshold value common to all observed MBeans.Gets the low threshold value common to all observed MBeans.Returns aNotificationInfoobject containing the name of the Java class of the notification and the notification types sent by the gauge monitor.booleanGets the high notification's on/off switch value common to all observed MBeans.booleanGets the low notification's on/off switch value common to all observed MBeans.voidsetDifferenceMode(boolean value) Sets the difference mode flag value common to all observed MBeans.voidsetNotifyHigh(boolean value) Sets the high notification's on/off switch value common to all observed MBeans.voidsetNotifyLow(boolean value) Sets the low notification's on/off switch value common to all observed MBeans.voidsetThresholds(Number highValue, Number lowValue) Sets the high and the low threshold values common to all observed MBeans.voidstart()Starts the gauge monitor.voidstop()Stops the gauge monitor.Methods declared in class javax.management.monitor.MonitoraddObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObjectMethods declared in class javax.management.NotificationBroadcasterSupportaddNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationMethods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface javax.management.monitor.MonitorMBeanaddObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject
- 
Constructor Details- 
GaugeMonitorpublic GaugeMonitor()Default constructor.
 
- 
- 
Method Details- 
startpublic void start()Starts the gauge monitor.- Specified by:
- startin interface- MonitorMBean
- Specified by:
- startin class- Monitor
 
- 
stoppublic void stop()Stops the gauge monitor.- Specified by:
- stopin interface- MonitorMBean
- Specified by:
- stopin class- Monitor
 
- 
getDerivedGaugeGets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, ornullotherwise.- Specified by:
- getDerivedGaugein interface- GaugeMonitorMBean
- Parameters:
- object- the name of the MBean.
- Returns:
- The derived gauge of the specified object.
 
- 
getDerivedGaugeTimeStampGets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or0otherwise.- Specified by:
- getDerivedGaugeTimeStampin interface- GaugeMonitorMBean
- Parameters:
- object- the name of the object whose derived gauge timestamp is to be returned.
- Returns:
- The derived gauge timestamp of the specified object.
 
- 
getDerivedGaugeDeprecated.As of JMX 1.2, replaced bygetDerivedGauge(ObjectName)Returns the derived gauge of the first object in the set of observed MBeans.- Specified by:
- getDerivedGaugein interface- GaugeMonitorMBean
- Returns:
- The derived gauge.
 
- 
getDerivedGaugeTimeStampDeprecated.As of JMX 1.2, replaced bygetDerivedGaugeTimeStamp(ObjectName)Gets the derived gauge timestamp of the first object in the set of observed MBeans.- Specified by:
- getDerivedGaugeTimeStampin interface- GaugeMonitorMBean
- Returns:
- The derived gauge timestamp.
 
- 
getHighThresholdGets the high threshold value common to all observed MBeans.- Specified by:
- getHighThresholdin interface- GaugeMonitorMBean
- Returns:
- The high threshold value.
- See Also:
 
- 
getLowThresholdGets the low threshold value common to all observed MBeans.- Specified by:
- getLowThresholdin interface- GaugeMonitorMBean
- Returns:
- The low threshold value.
- See Also:
 
- 
setThresholdsSets the high and the low threshold values common to all observed MBeans.- Specified by:
- setThresholdsin interface- GaugeMonitorMBean
- Parameters:
- highValue- The high threshold value.
- lowValue- The low threshold value.
- Throws:
- 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.
- See Also:
 
- 
getNotifyHighpublic boolean getNotifyHigh()Gets the high notification's on/off switch value common to all observed MBeans.- Specified by:
- getNotifyHighin interface- GaugeMonitorMBean
- Returns:
- trueif the gauge monitor notifies when exceeding the high threshold,- falseotherwise.
- See Also:
 
- 
setNotifyHighpublic void setNotifyHigh(boolean value) Sets the high notification's on/off switch value common to all observed MBeans.- Specified by:
- setNotifyHighin interface- GaugeMonitorMBean
- Parameters:
- value- The high notification's on/off switch value.
- See Also:
 
- 
getNotifyLowpublic boolean getNotifyLow()Gets the low notification's on/off switch value common to all observed MBeans.- Specified by:
- getNotifyLowin interface- GaugeMonitorMBean
- Returns:
- trueif the gauge monitor notifies when exceeding the low threshold,- falseotherwise.
- See Also:
 
- 
setNotifyLowpublic void setNotifyLow(boolean value) Sets the low notification's on/off switch value common to all observed MBeans.- Specified by:
- setNotifyLowin interface- GaugeMonitorMBean
- Parameters:
- value- The low notification's on/off switch value.
- See Also:
 
- 
getDifferenceModepublic boolean getDifferenceMode()Gets the difference mode flag value common to all observed MBeans.- Specified by:
- getDifferenceModein interface- GaugeMonitorMBean
- Returns:
- trueif the difference mode is used,- falseotherwise.
- See Also:
 
- 
setDifferenceModepublic void setDifferenceMode(boolean value) Sets the difference mode flag value common to all observed MBeans.- Specified by:
- setDifferenceModein interface- GaugeMonitorMBean
- Parameters:
- value- The difference mode flag value.
- See Also:
 
- 
getNotificationInfoReturns aNotificationInfoobject containing the name of the Java class of the notification and the notification types sent by the gauge monitor.- Specified by:
- getNotificationInfoin interface- NotificationBroadcaster
- Returns:
- the array of possible notifications.
 
 
- 
getDerivedGauge(ObjectName)