|
|||||||||
| 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.
| Inner Class Summary | |
(package private) class |
StringMonitor.StringMonitorThread
This inner class implements Runnable and when the StringMonitor is started, the start method of this class is called and it periodically polls the Observed Attribute according to the granularity period and when there is a deviation from the configuration details, sends a notification. |
| Fields inherited from class javax.management.monitor.Monitor |
alreadyNotified,
alreadyNotifieds,
capacityIncrement,
dbgTag,
derivedGaugeTimeStamp,
elementCount,
isActive,
logger,
OBSERVED_ATTRIBUTE_ERROR_NOTIFIED,
OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED,
OBSERVED_OBJECT_ERROR_NOTIFIED,
RESET_FLAGS_ALREADY_NOTIFIED,
RUNTIME_ERROR_NOTIFIED,
sequenceNumber,
server |
| Fields inherited from class javax.management.NotificationBroadcasterSupport |
li |
| Constructor Summary | |
StringMonitor()
Default Constructor. |
|
| Method Summary | |
java.lang.String |
getDerivedGauge()
Deprecated. Replaced by getDerivedGauge(ObjectName) |
java.lang.String |
getDerivedGauge(ObjectName object)
This method gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, or null otherwise. |
long |
getDerivedGaugeTimeStamp()
Deprecated. Replaced by getDerivedGaugeTimeStamp(ObjectName) |
long |
getDerivedGaugeTimeStamp(ObjectName object)
This method gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or null otherwise. |
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 common to all observed MBeans. |
boolean |
getNotifyMatch()
This method gets the matching notification's on/off switch value common to all observed MBeans. |
java.lang.String |
getStringToCompare()
This method gets the string to compare with the observed attribute. |
(package private) void |
insertSpecificElementAt(int index)
This method is called when adding a new observed object in the list. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Overriding the preRegister() of MBeanRegistration interface to store the ObjectName locally. |
(package private) void |
removeSpecificElementAt(int index)
This method is called when removing an observed object from the list. |
void |
setNotifyDiffer(boolean value)
This method sets the differing notification's on/off switch value common to all observed MBeans. |
void |
setNotifyMatch(boolean value)
This method sets the matching notification's on/off switch value common to all observed MBeans. |
void |
setStringToCompare(java.lang.String value)
This method sets the string to compare with the observed attribute common to all observed MBeans. |
void |
start()
This method starts the String Monitor. |
void |
stop()
This method stops the String Monitor. |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener,
handleNotification,
handleNotification,
removeNotificationListener,
removeNotificationListener,
sendNotification |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public StringMonitor()
| Method Detail |
public java.lang.String getDerivedGauge()
getDerivedGauge(ObjectName)
public java.lang.String getDerivedGauge(ObjectName object)
null otherwise.object - the name of the MBean whose derived gauge is required.public long getDerivedGaugeTimeStamp()
getDerivedGaugeTimeStamp(ObjectName)
public long getDerivedGaugeTimeStamp(ObjectName object)
null otherwise.object - the name of the MBean whose derived gauge
timestamp is required.public boolean getNotifyDiffer()
true if the string monitor notifies when
differing from the string to compare, false otherwise.setNotifyDiffer(boolean)public void setNotifyDiffer(boolean value)
value - - The differing notification's on/off switch value.getNotifyDiffer()public boolean getNotifyMatch()
true if the string monitor notifies when
matching the string to compare, false otherwise.setNotifyMatch(boolean)public void setNotifyMatch(boolean value)
value - The matching notification's on/off switch value.getNotifyMatch()public java.lang.String getStringToCompare()
public void setStringToCompare(java.lang.String value)
throws java.lang.IllegalArgumentException
The - String Value to be compared.getStringToCompare()public void start()
public void stop()
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
server - - The MBean server in which the monitor MBean will be registered.name - - The object name of the monitor MBean.public MBeanNotificationInfo[] getNotificationInfo()
void insertSpecificElementAt(int index)
index - The index of the observed object.void removeSpecificElementAt(int index)
index - The index of the observed object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||