javax.management.monitor
Class StringMonitor

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

public class StringMonitor
extends Monitor (src)
implements StringMonitorMBean (src)

The string 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
StringMonitor()
          Default Constructor
 
Method Summary
 java.lang.String getDerivedGauge()
          Retrieves the derived gauge.
 java.lang.String 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.
 MBeanNotificationInfo (src) [] getNotificationInfo()
          Returns the notification metadata associated with the MBean.
 boolean getNotifyDiffer()
          Retrieves the differs on/off switch.
 boolean getNotifyMatch()
          Retrieves the matching on/off switch.
 java.lang.String getStringToCompare()
          Retrieves the string to compare with the observed attribute.
 void setNotifyDiffer(boolean value)
          Sets the differs on/off switch.
 void setNotifyMatch(boolean value)
          Sets the matching on/off switch.
 void setStringToCompare(java.lang.String value)
          Sets the string to compare with the observed attribute.
 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

StringMonitor

public StringMonitor()
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.String getDerivedGauge()
Description copied from interface: StringMonitorMBean (src)
Retrieves the derived gauge.

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

getDerivedGauge

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

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

getDerivedGaugeTimeStamp

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

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

getDerivedGaugeTimeStamp

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

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

getStringToCompare

public java.lang.String getStringToCompare()
Description copied from interface: StringMonitorMBean (src)
Retrieves the string to compare with the observed attribute.

Specified by:
getStringToCompare in interface StringMonitorMBean (src)
Returns:
the comparison string.

setStringToCompare

public void setStringToCompare(java.lang.String value)
                        throws java.lang.IllegalArgumentException
Description copied from interface: StringMonitorMBean (src)
Sets the string to compare with the observed attribute.

Specified by:
setStringToCompare in interface StringMonitorMBean (src)
Parameters:
value - the comparison string.
Throws:
java.lang.IllegalArgumentException - when specified string is null.

getNotifyMatch

public boolean getNotifyMatch()
Description copied from interface: StringMonitorMBean (src)
Retrieves the matching on/off switch.

Specified by:
getNotifyMatch in interface StringMonitorMBean (src)
Returns:
true if the notification occurs when the string matches, false otherwise.

setNotifyMatch

public void setNotifyMatch(boolean value)
Description copied from interface: StringMonitorMBean (src)
Sets the matching on/off switch.

Specified by:
setNotifyMatch in interface StringMonitorMBean (src)
Parameters:
value - pass true for a notification when the string matches, false otherwise.

getNotifyDiffer

public boolean getNotifyDiffer()
Description copied from interface: StringMonitorMBean (src)
Retrieves the differs on/off switch.

Specified by:
getNotifyDiffer in interface StringMonitorMBean (src)
Returns:
true if the notification occurs when the string differs, false otherwise.

setNotifyDiffer

public void setNotifyDiffer(boolean value)
Description copied from interface: StringMonitorMBean (src)
Sets the differs on/off switch.

Specified by:
setNotifyDiffer in interface StringMonitorMBean (src)
Parameters:
value - pass true for a notification when the string differs, false otherwise.

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)