This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management.monitor
class StringMonitor

java.lang.Object extended by javax.management.NotificationBroadcasterSupport extended by javax.management.monitor.Monitor extended by javax.management.monitor.StringMonitor
All Implemented Interfaces:
MBeanRegistration, NotificationEmitter, MonitorMBean, StringMonitorMBean

Most common way to construct:

StringMonitor sm = new StringMonitor();

Based on 21 examples


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:


Field Summary
 
Fields inherited from class javax.management.monitor.Monitor
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

          Default constructor.
 
Method Summary
 String

          Returns the derived gauge of the first object in the set of observed MBeans.
 String

          Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, or null otherwise.
 long

          Gets the derived gauge timestamp of the first object in the set of observed MBeans.
 long

          Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or 0 otherwise.
 MBeanNotificationInfo[]

          Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent by the string monitor.
 boolean

          Gets the differing notification's on/off switch value common to all observed MBeans.
 boolean

          Gets the matching notification's on/off switch value common to all observed MBeans.
 String

          Gets the string to compare with the observed attribute common to all observed MBeans.
 void
setNotifyDiffer(boolean value)

          Sets the differing notification's on/off switch value common to all observed MBeans.
 void
setNotifyMatch(boolean value)

          Sets the matching notification's on/off switch value common to all observed MBeans.
 void

          Sets the string to compare with the observed attribute common to all observed MBeans.
 void

          Starts the string monitor.
 void

          Stops the string monitor.
 
Methods inherited from class javax.management.monitor.Monitor
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject, start, stop
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringMonitor

public StringMonitor()
Default constructor.

Method Detail

getDerivedGauge

public synchronized String getDerivedGauge()
Returns the derived gauge of the first object in the set of observed MBeans.

Returns:
The derived gauge.

getDerivedGauge

public synchronized String getDerivedGauge(ObjectName object)
Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, or null otherwise.

Overrides:
getDerivedGauge in class Monitor
Parameters:
object - the name of the MBean whose derived gauge is required.
Returns:
The derived gauge of the specified object.

getDerivedGaugeTimeStamp

public synchronized long getDerivedGaugeTimeStamp()
Gets the derived gauge timestamp of the first object in the set of observed MBeans.

Returns:
The derived gauge timestamp.

getDerivedGaugeTimeStamp

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, or 0 otherwise.

Overrides:
getDerivedGaugeTimeStamp in class Monitor
Parameters:
object - the name of the object whose derived gauge timestamp is to be returned.
Returns:
The derived gauge timestamp of the specified object.

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent by the string monitor.

Overrides:
getNotificationInfo in class NotificationBroadcasterSupport

getNotifyDiffer

public synchronized boolean getNotifyDiffer()
Gets the differing notification's on/off switch value common to all observed MBeans.

Returns:
true if the string monitor notifies when differing from the string to compare, false otherwise.

getNotifyMatch

public synchronized boolean getNotifyMatch()
Gets the matching notification's on/off switch value common to all observed MBeans.

Returns:
true if the string monitor notifies when matching the string to compare, false otherwise.

getStringToCompare

public synchronized String getStringToCompare()
Gets the string to compare with the observed attribute common to all observed MBeans.

Returns:
The string value.

setNotifyDiffer

public synchronized void setNotifyDiffer(boolean value)
Sets the differing notification's on/off switch value common to all observed MBeans.

Parameters:
value - The differing notification's on/off switch value.

setNotifyMatch

public synchronized void setNotifyMatch(boolean value)
Sets the matching notification's on/off switch value common to all observed MBeans.

Parameters:
value - The matching notification's on/off switch value.

setStringToCompare

public synchronized void setStringToCompare(String value)
                                     throws IllegalArgumentException
Sets the string to compare with the observed attribute common to all observed MBeans.

Parameters:
value - The string value.
Throws:
IllegalArgumentException - The specified string to compare is null.

start

public synchronized void start()
Starts the string monitor.

Overrides:
start in class Monitor

stop

public synchronized void stop()
Stops the string monitor.

Overrides:
stop in class Monitor


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.