XMOJO 5 API Docs

javax.management.monitor
Class StringMonitor

java.lang.Object
  |
  +--javax.management.NotificationBroadcasterSupport
        |
        +--javax.management.monitor.Monitor
              |
              +--javax.management.monitor.StringMonitor
All Implemented Interfaces:
MBeanRegistration, MonitorMBean, NotificationBroadcaster, java.io.Serializable, StringMonitorMBean

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:

See Also:
Serialized Form

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
StringMonitor()
          Default Constructor.
 
Method Summary
 java.lang.String 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.
 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 getNotifyDiffer()
          This method sets the differing notification's on/off switch value.
 boolean getNotifyMatch()
          This method gets the matching notification's on/off switch value.
 java.lang.String getStringToCompare()
          This method gets the string to compare with the observed attribute.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Overriding the preRegister() of MBeanRegistration interface to store the ObjectName locally.
 void setNotifyDiffer(boolean value)
          This method sets the differing notification's on/off switch value.
 void setNotifyMatch(boolean value)
          This method sets the matching notification's on/off switch value.
 void setStringToCompare(java.lang.String value)
          This method sets the string to compare with the observed attribute.
 void start()
          This method starts the String Monitor.
 void stop()
          This method stops the String 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

StringMonitor

public StringMonitor()
Default Constructor.
Method Detail

getDerivedGauge

public java.lang.String getDerivedGauge()
This method gets the value of the derived gauge. The derived gauge is either the exact value of the observed attribute , or the difference between the two consecutive observed values of the attribute.
Specified by:
getDerivedGauge in interface StringMonitorMBean
Returns:
An instance of java.lang.String giving the value of the derived gauge.

getDerivedGaugeTimeStamp

public 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.
Specified by:
getDerivedGaugeTimeStamp in interface StringMonitorMBean
Returns:
long value representing the time the notification was triggered.

getNotifyDiffer

public boolean getNotifyDiffer()
This method sets the differing notification's on/off switch value.
Specified by:
getNotifyDiffer in interface StringMonitorMBean
Returns:
The differing notification's on/off switch value.

setNotifyDiffer

public void setNotifyDiffer(boolean value)
This method sets the differing notification's on/off switch value.
Specified by:
setNotifyDiffer in interface StringMonitorMBean
Parameters:
value - - The differing notification's on/off switch value.

getNotifyMatch

public boolean getNotifyMatch()
This method gets the matching notification's on/off switch value.
Specified by:
getNotifyMatch in interface StringMonitorMBean
Returns:
The matching notification's on/off switch value.

setNotifyMatch

public void setNotifyMatch(boolean value)
This method sets the matching notification's on/off switch value.
Specified by:
setNotifyMatch in interface StringMonitorMBean
Parameters:
value - - The matching notification's on/off switch value.

getStringToCompare

public java.lang.String getStringToCompare()
This method gets the string to compare with the observed attribute.
Specified by:
getStringToCompare in interface StringMonitorMBean
Returns:
the String to be compared.

setStringToCompare

public void setStringToCompare(java.lang.String value)
                        throws java.lang.IllegalArgumentException
This method sets the string to compare with the observed attribute.
Specified by:
setStringToCompare in interface StringMonitorMBean
Parameters:
The - String Value to be compared.
Throws:
java.lang.IllegalArgumentException - - The specified string to compare is null.

start

public void start()
This method starts the String Monitor.
Specified by:
start in interface MonitorMBean
Overrides:
start in class Monitor

stop

public void stop()
This method stops the String Monitor.
Specified by:
stop in interface MonitorMBean
Overrides:
stop in class Monitor

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws java.lang.Exception
Overriding the preRegister() of MBeanRegistration interface to store the ObjectName locally.
Overrides:
preRegister in class Monitor
Following copied from class: javax.management.monitor.Monitor
Parameters:
server - - The MBean server in which the monitor MBean will be registered.
name - - The object name of the monitor MBean.
Returns:
This method allows the monitor MBean to perform any operations it needs before being registered in the MBean server.
Throws:
- - java.lang.Exception.

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Description copied from class: Monitor
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.
Overrides:
getNotificationInfo in class Monitor
Following copied from class: javax.management.monitor.Monitor
Returns:
An Array of MBeanNotificationInfo objects.

XMOJO 5 API Docs

Copyright ©2003 XMOJO.org. All Rights Reserved.