Class: javax.management.monitor.StringMonitor
- public class StringMonitor
- extends Monitor
- implements StringMonitorMBean
Defines a monitor MBean designed to observe the values of a string
attribute.
A string monitor sends notifications as follows:
- if the attribute value matches the string to compare value,
a match notification is sent.
The notify match flag must be set to
true.
Subsequent matchings of the string to compare values do not cause further notifications unless the attribute value differs from the string to compare value. - if the attribute value differs from the string to compare value,
a differ notification is sent.
The notify differ flag must be set to
true.
Subsequent differences from the string to compare value do not cause further notifications unless the attribute value matches the string to compare value.
Inheritance
Superclass tree:- java.lang.Object
- javax.management.NotificationBroadcasterSupport
- javax.management.monitor.Monitor
- javax.management.monitor.StringMonitor
Methods
-
StringMonitortop
public StringMonitor()Default constructor. -
getDerivedGaugetop
public synchronized String getDerivedGauge()Returns the derived gauge of the first object in the set of observed MBeans.- Specified by:
- getDerivedGauge from StringMonitorMBean
-
getDerivedGaugetop
Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, ornullotherwise.- Specified by:
- getDerivedGauge from StringMonitorMBean
-
getDerivedGaugeTimeStamptop
public synchronized long getDerivedGaugeTimeStamp()Gets the derived gauge timestamp of the first object in the set of observed MBeans.- Specified by:
- getDerivedGaugeTimeStamp from StringMonitorMBean
-
getDerivedGaugeTimeStamptop
public synchronized long getDerivedGaugeTimeStamp(ObjectName object)Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or0otherwise.- Specified by:
- getDerivedGaugeTimeStamp from StringMonitorMBean
-
getNotificationInfotop
public MBeanNotificationInfo[] getNotificationInfo()Returns aNotificationInfoobject containing the name of the Java class of the notification and the notification types sent by the string monitor.- Specified by:
- getNotificationInfo from NotificationBroadcaster
- Override hierarchy:
- getNotificationInfo from NotificationBroadcasterSupport
-
getNotifyDiffertop
public synchronized boolean getNotifyDiffer()Gets the differing notification's on/off switch value common to all observed MBeans.- Specified by:
- getNotifyDiffer from StringMonitorMBean
-
getNotifyMatchtop
public synchronized boolean getNotifyMatch()Gets the matching notification's on/off switch value common to all observed MBeans.- Specified by:
- getNotifyMatch from StringMonitorMBean
-
getStringToComparetop
public synchronized String getStringToCompare()Gets the string to compare with the observed attribute common to all observed MBeans.- Specified by:
- getStringToCompare from StringMonitorMBean
-
setNotifyDiffertop
public synchronized void setNotifyDiffer(boolean value)Sets the differing notification's on/off switch value common to all observed MBeans.- Specified by:
- setNotifyDiffer from StringMonitorMBean
-
setNotifyMatchtop
public synchronized void setNotifyMatch(boolean value)Sets the matching notification's on/off switch value common to all observed MBeans.- Specified by:
- setNotifyMatch from StringMonitorMBean
-
setStringToComparetop
public synchronized void setStringToCompare(String value) throws IllegalArgumentExceptionSets the string to compare with the observed attribute common to all observed MBeans.- Specified by:
- setStringToCompare from StringMonitorMBean
-
starttop
public synchronized void start()Starts the string monitor.- Specified by:
- start from MonitorMBean
-
stoptop
public synchronized void stop()Stops the string monitor.- Specified by:
- stop from MonitorMBean
