javax.management.monitor
Class GaugeMonitor

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport (src) 
      extended byjavax.management.monitor.Monitor (src) 
          extended byjavax.management.monitor.GaugeMonitor
All Implemented Interfaces:
GaugeMonitorMBean (src) , MBeanRegistration (src) , MonitorMBean (src) , NotificationBroadcaster (src) , NotificationEmitter (src)

public class GaugeMonitor
extends Monitor (src)
implements GaugeMonitorMBean (src)

The gauge monitor service.


Field Summary
 
Fields inherited from class javax.management.monitor.Monitor (src)
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
GaugeMonitor()
          Default Constructor
 
Method Summary
 java.lang.Number getDerivedGauge()
          Retrieves the derived gauge.
 java.lang.Number getDerivedGauge(ObjectName (src)  name)
          Retrieves the derived gauge.
 long getDerivedGaugeTimeStamp()
          Retrieves the derived gauge timestamp.
 long getDerivedGaugeTimeStamp(ObjectName (src)  name)
          Retrieves the derived gauge timestamp.
 boolean getDifferenceMode()
          Retrieves the difference mode flag.
 java.lang.Number getHighThreshold()
          Retrieves the high threshold.
 java.lang.Number getLowThreshold()
          Retrieves the low threshold.
 MBeanNotificationInfo (src) [] getNotificationInfo()
          Returns the notification metadata associated with the MBean.
 boolean getNotifyHigh()
          Retrieves the high notify on/off switch.
 boolean getNotifyLow()
          Retrieves the low notify on/off switch.
 void setDifferenceMode(boolean value)
          Sets the difference mode flag.
 void setNotifyHigh(boolean value)
          Sets the high notify on/off switch.
 void setNotifyLow(boolean value)
          Sets the low notify on/off switch.
 void setThresholds(java.lang.Number highValue, java.lang.Number lowValue)
          Sets the high and low threshold.
 void start()
          Starts the monitor.
 void stop()
          Stops the monitor.
 
Methods inherited from class javax.management.monitor.Monitor (src)
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject, toString
 
Methods inherited from class javax.management.NotificationBroadcasterSupport (src)
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.monitor.MonitorMBean (src)
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject
 

Constructor Detail

GaugeMonitor

public GaugeMonitor()
Default Constructor

Method Detail

getNotificationInfo

public MBeanNotificationInfo (src) [] getNotificationInfo()
Description copied from interface: NotificationBroadcaster (src)
Returns the notification metadata associated with the MBean.

Specified by:
getNotificationInfo in interface NotificationBroadcaster (src)
Overrides:
getNotificationInfo in class NotificationBroadcasterSupport (src)

getDerivedGauge

public java.lang.Number getDerivedGauge()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the derived gauge.

Specified by:
getDerivedGauge in interface GaugeMonitorMBean (src)
Returns:
the derived gauge.

getDerivedGauge

public java.lang.Number getDerivedGauge(ObjectName (src)  name)
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the derived gauge.

Specified by:
getDerivedGauge in interface GaugeMonitorMBean (src)
Parameters:
name - the object name of the mbean.
Returns:
the derived gauge.

getDerivedGaugeTimeStamp

public long getDerivedGaugeTimeStamp()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the derived gauge timestamp.

Specified by:
getDerivedGaugeTimeStamp in interface GaugeMonitorMBean (src)
Returns:
the derived gauge timestamp.

getDerivedGaugeTimeStamp

public long getDerivedGaugeTimeStamp(ObjectName (src)  name)
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the derived gauge timestamp.

Specified by:
getDerivedGaugeTimeStamp in interface GaugeMonitorMBean (src)
Parameters:
name - the object name of the mbean.
Returns:
the derived gauge timestamp.

getDifferenceMode

public boolean getDifferenceMode()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the difference mode flag.

Specified by:
getDifferenceMode in interface GaugeMonitorMBean (src)
Returns:
true when in difference mode, false otherwise.

setDifferenceMode

public void setDifferenceMode(boolean value)
Description copied from interface: GaugeMonitorMBean (src)
Sets the difference mode flag.

Specified by:
setDifferenceMode in interface GaugeMonitorMBean (src)

getNotifyHigh

public boolean getNotifyHigh()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the high notify on/off switch.

Specified by:
getNotifyHigh in interface GaugeMonitorMBean (src)
Returns:
true if high notifications occur, false otherwise.

setNotifyHigh

public void setNotifyHigh(boolean value)
Description copied from interface: GaugeMonitorMBean (src)
Sets the high notify on/off switch.

Specified by:
setNotifyHigh in interface GaugeMonitorMBean (src)
Parameters:
value - pass true for high notifications, false otherwise.

getNotifyLow

public boolean getNotifyLow()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the low notify on/off switch.

Specified by:
getNotifyLow in interface GaugeMonitorMBean (src)
Returns:
true if low notifications occur, false otherwise.

setNotifyLow

public void setNotifyLow(boolean value)
Description copied from interface: GaugeMonitorMBean (src)
Sets the low notify on/off switch.

Specified by:
setNotifyLow in interface GaugeMonitorMBean (src)
Parameters:
value - pass true for low notifications, false otherwise.

getHighThreshold

public java.lang.Number getHighThreshold()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the high threshold. REVIEW: zero threshold

Specified by:
getHighThreshold in interface GaugeMonitorMBean (src)
Returns:
the high threshold value, zero means no threshold.

getLowThreshold

public java.lang.Number getLowThreshold()
Description copied from interface: GaugeMonitorMBean (src)
Retrieves the low threshold. REVIEW: zero threshold

Specified by:
getLowThreshold in interface GaugeMonitorMBean (src)
Returns:
the low threshold value, zero means no threshold.

setThresholds

public void setThresholds(java.lang.Number highValue,
                          java.lang.Number lowValue)
                   throws java.lang.IllegalArgumentException
Description copied from interface: GaugeMonitorMBean (src)
Sets the high and low threshold. REVIEW: zero threshold

Specified by:
setThresholds in interface GaugeMonitorMBean (src)
Parameters:
highValue - the high threshold value, pass zero for no high threshold.
lowValue - the low threshold value, pass zero for no low threshold.
Throws:
java.lang.IllegalArgumentException - when either threshold is null or the high threshold is lower than the low threshold or the. thresholds have different types.

start

public void start()
Description copied from interface: MonitorMBean (src)
Starts the monitor.

Specified by:
start in interface MonitorMBean (src)
Specified by:
start in class Monitor (src)

stop

public void stop()
Description copied from interface: MonitorMBean (src)
Stops the monitor.

Specified by:
stop in interface MonitorMBean (src)
Specified by:
stop in class Monitor (src)