|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.management.NotificationBroadcasterSupport | +--javax.management.monitor.Monitor | +--javax.management.monitor.StringMonitor
Defines a monitor MBean designed to observe the values of a string attribute.
A string monitor sends notifications as follows:
match notification
is sent.
The notify match flag must be set to true
.
differ notification
is sent.
The notify differ flag must be set to true
.
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 |
public StringMonitor()
Method Detail |
public java.lang.String getDerivedGauge()
getDerivedGauge
in interface StringMonitorMBean
public long getDerivedGaugeTimeStamp()
getDerivedGaugeTimeStamp
in interface StringMonitorMBean
public boolean getNotifyDiffer()
getNotifyDiffer
in interface StringMonitorMBean
public void setNotifyDiffer(boolean value)
setNotifyDiffer
in interface StringMonitorMBean
value
- - The differing notification's on/off switch value.public boolean getNotifyMatch()
getNotifyMatch
in interface StringMonitorMBean
public void setNotifyMatch(boolean value)
setNotifyMatch
in interface StringMonitorMBean
value
- - The matching notification's on/off switch value.public java.lang.String getStringToCompare()
getStringToCompare
in interface StringMonitorMBean
public void setStringToCompare(java.lang.String value) throws java.lang.IllegalArgumentException
setStringToCompare
in interface StringMonitorMBean
The
- String Value to be compared.java.lang.IllegalArgumentException
- - The specified string to
compare is null.public void start()
start
in interface MonitorMBean
start
in class Monitor
public void stop()
stop
in interface MonitorMBean
stop
in class Monitor
public ObjectName preRegister(MBeanServer server, ObjectName name) throws java.lang.Exception
preRegister
in class Monitor
javax.management.monitor.Monitor
server
- - The MBean server in which the monitor MBean will be registered.name
- - The object name of the monitor MBean.-
- java.lang.Exception.public MBeanNotificationInfo[] getNotificationInfo()
Monitor
getNotificationInfo
in class Monitor
javax.management.monitor.Monitor
|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |