javax.management.monitor
Class Monitor

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport 
      extended by javax.management.monitor.Monitor
All Implemented Interfaces:
MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration , MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean , NotificationBroadcaster sample code for javax.management.NotificationBroadcaster definition code for javax.management.NotificationBroadcaster , NotificationEmitter sample code for javax.management.NotificationEmitter definition code for javax.management.NotificationEmitter
Direct Known Subclasses:
CounterMonitor sample code for javax.management.monitor.CounterMonitor definition code for javax.management.monitor.CounterMonitor , GaugeMonitor sample code for javax.management.monitor.GaugeMonitor definition code for javax.management.monitor.GaugeMonitor , StringMonitor sample code for javax.management.monitor.StringMonitor definition code for javax.management.monitor.StringMonitor

public abstract class Monitor
extends NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
implements MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean , MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration

Defines the common part to all monitor MBeans. A monitor MBean monitors values of an attribute common to a set of observed MBeans. The observed attribute is monitored at intervals specified by the granularity period. A gauge value (derived gauge) is derived from the values of the observed attribute.

Since:
1.5

Field Summary
protected  int alreadyNotified sample code for javax.management.monitor.Monitor.alreadyNotified definition code for javax.management.monitor.Monitor.alreadyNotified
          Deprecated. equivalent to alreadyNotifieds sample code for javax.management.monitor.Monitor.alreadyNotifieds definition code for javax.management.monitor.Monitor.alreadyNotifieds [0].
protected  int[] alreadyNotifieds sample code for javax.management.monitor.Monitor.alreadyNotifieds definition code for javax.management.monitor.Monitor.alreadyNotifieds
          Selected monitor errors that have already been notified.
protected static int capacityIncrement sample code for javax.management.monitor.Monitor.capacityIncrement definition code for javax.management.monitor.Monitor.capacityIncrement
          The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
protected  String sample code for java.lang.String definition code for java.lang.String dbgTag sample code for javax.management.monitor.Monitor.dbgTag definition code for javax.management.monitor.Monitor.dbgTag
          Deprecated. No replacement.
protected  int elementCount sample code for javax.management.monitor.Monitor.elementCount definition code for javax.management.monitor.Monitor.elementCount
          The number of valid components in the vector of observed objects.
protected static int OBSERVED_ATTRIBUTE_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_ATTRIBUTE_ERROR_NOTIFIED definition code for javax.management.monitor.Monitor.OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
          Flag denoting that a notification has occurred after changing the observed attribute.
protected static int OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED definition code for javax.management.monitor.Monitor.OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
          Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
protected static int OBSERVED_OBJECT_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_OBJECT_ERROR_NOTIFIED definition code for javax.management.monitor.Monitor.OBSERVED_OBJECT_ERROR_NOTIFIED
          Flag denoting that a notification has occurred after changing the observed object.
protected static int RESET_FLAGS_ALREADY_NOTIFIED sample code for javax.management.monitor.Monitor.RESET_FLAGS_ALREADY_NOTIFIED definition code for javax.management.monitor.Monitor.RESET_FLAGS_ALREADY_NOTIFIED
          This flag is used to reset the alreadyNotifieds sample code for javax.management.monitor.Monitor.alreadyNotifieds definition code for javax.management.monitor.Monitor.alreadyNotifieds monitor attribute.
protected static int RUNTIME_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.RUNTIME_ERROR_NOTIFIED definition code for javax.management.monitor.Monitor.RUNTIME_ERROR_NOTIFIED
          Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
protected  MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer server sample code for javax.management.monitor.Monitor.server definition code for javax.management.monitor.Monitor.server
          Reference on the MBean server.
 
Constructor Summary
Monitor sample code for javax.management.monitor.Monitor.Monitor() definition code for javax.management.monitor.Monitor.Monitor() ()
           
 
Method Summary
 void addObservedObject sample code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
          Adds the specified object in the set of observed MBeans, if this object is not already present.
 boolean containsObservedObject sample code for javax.management.monitor.Monitor.containsObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.containsObservedObject(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
          Tests whether the specified object is in the set of observed MBeans.
 long getGranularityPeriod sample code for javax.management.monitor.Monitor.getGranularityPeriod() definition code for javax.management.monitor.Monitor.getGranularityPeriod() ()
          Gets the granularity period (in milliseconds).
 String sample code for java.lang.String definition code for java.lang.String getObservedAttribute sample code for javax.management.monitor.Monitor.getObservedAttribute() definition code for javax.management.monitor.Monitor.getObservedAttribute() ()
          Gets the attribute being observed.
 ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName getObservedObject sample code for javax.management.monitor.Monitor.getObservedObject() definition code for javax.management.monitor.Monitor.getObservedObject() ()
          Deprecated. As of JMX 1.2, replaced by getObservedObjects() sample code for javax.management.monitor.Monitor.getObservedObjects() definition code for javax.management.monitor.Monitor.getObservedObjects()
 ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName [] getObservedObjects sample code for javax.management.monitor.Monitor.getObservedObjects() definition code for javax.management.monitor.Monitor.getObservedObjects() ()
          Returns an array containing the objects being observed.
 boolean isActive sample code for javax.management.monitor.Monitor.isActive() definition code for javax.management.monitor.Monitor.isActive() ()
          Tests whether the monitor MBean is active.
 void postDeregister sample code for javax.management.monitor.Monitor.postDeregister() definition code for javax.management.monitor.Monitor.postDeregister() ()
          Allows the monitor MBean to perform any operations needed after having been unregistered by the MBean server.
 void postRegister sample code for javax.management.monitor.Monitor.postRegister(java.lang.Boolean) definition code for javax.management.monitor.Monitor.postRegister(java.lang.Boolean) (Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  registrationDone)
          Allows the monitor MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
 void preDeregister sample code for javax.management.monitor.Monitor.preDeregister() definition code for javax.management.monitor.Monitor.preDeregister() ()
          Allows the monitor MBean to perform any operations it needs before being unregistered by the MBean server.
 ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName preRegister sample code for javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName) (MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  server, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Allows the monitor MBean to perform any operations it needs before being registered in the MBean server.
 void removeObservedObject sample code for javax.management.monitor.Monitor.removeObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.removeObservedObject(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
          Removes the specified object from the set of observed MBeans.
 void setGranularityPeriod sample code for javax.management.monitor.Monitor.setGranularityPeriod(long) definition code for javax.management.monitor.Monitor.setGranularityPeriod(long) (long period)
          Sets the granularity period (in milliseconds).
 void setObservedAttribute sample code for javax.management.monitor.Monitor.setObservedAttribute(java.lang.String) definition code for javax.management.monitor.Monitor.setObservedAttribute(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  attribute)
          Sets the attribute to observe.
 void setObservedObject sample code for javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
          Deprecated. As of JMX 1.2, replaced by addObservedObject(javax.management.ObjectName) sample code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName)
abstract  void start sample code for javax.management.monitor.Monitor.start() definition code for javax.management.monitor.Monitor.start() ()
          Starts the monitor.
abstract  void stop sample code for javax.management.monitor.Monitor.stop() definition code for javax.management.monitor.Monitor.stop() ()
          Stops the monitor.
 
Methods inherited from class javax.management.NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
addNotificationListener sample code for javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , getNotificationInfo sample code for javax.management.NotificationBroadcasterSupport.getNotificationInfo() definition code for javax.management.NotificationBroadcasterSupport.getNotificationInfo() , handleNotification sample code for javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object) , removeNotificationListener sample code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener) definition code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener) , removeNotificationListener sample code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , sendNotification sample code for javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification) definition code for javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

capacityIncrement sample code for javax.management.monitor.Monitor.capacityIncrement

protected static final int capacityIncrement
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.

See Also:
Constant Field Values

elementCount sample code for javax.management.monitor.Monitor.elementCount

protected int elementCount
The number of valid components in the vector of observed objects.


alreadyNotified sample code for javax.management.monitor.Monitor.alreadyNotified

@Deprecated
protected int alreadyNotified
Deprecated. equivalent to alreadyNotifieds sample code for javax.management.monitor.Monitor.alreadyNotifieds definition code for javax.management.monitor.Monitor.alreadyNotifieds [0].
Monitor errors that have already been notified.


alreadyNotifieds sample code for javax.management.monitor.Monitor.alreadyNotifieds

protected int[] alreadyNotifieds

Selected monitor errors that have already been notified.

Each element in this array corresponds to an observed object in the vector. It contains a bit mask of the flags OBSERVED_OBJECT_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_OBJECT_ERROR_NOTIFIED definition code for javax.management.monitor.Monitor.OBSERVED_OBJECT_ERROR_NOTIFIED etc, indicating whether the corresponding notification has already been sent for the MBean being monitored.


server sample code for javax.management.monitor.Monitor.server

protected MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  server
Reference on the MBean server. This reference is null when the monitor MBean is not registered in an MBean server. This reference is initialized before the monitor MBean is registered in the MBean server.

See Also:
preRegister(MBeanServer server, ObjectName name) sample code for javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName)

RESET_FLAGS_ALREADY_NOTIFIED sample code for javax.management.monitor.Monitor.RESET_FLAGS_ALREADY_NOTIFIED

protected static final int RESET_FLAGS_ALREADY_NOTIFIED
This flag is used to reset the alreadyNotifieds sample code for javax.management.monitor.Monitor.alreadyNotifieds definition code for javax.management.monitor.Monitor.alreadyNotifieds monitor attribute.

See Also:
Constant Field Values

OBSERVED_OBJECT_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_OBJECT_ERROR_NOTIFIED

protected static final int OBSERVED_OBJECT_ERROR_NOTIFIED
Flag denoting that a notification has occurred after changing the observed object. This flag is used to check that the new observed object is registered in the MBean server at the time of the first notification.

See Also:
Constant Field Values

OBSERVED_ATTRIBUTE_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_ATTRIBUTE_ERROR_NOTIFIED

protected static final int OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
Flag denoting that a notification has occurred after changing the observed attribute. This flag is used to check that the new observed attribute belongs to the observed object at the time of the first notification.

See Also:
Constant Field Values

OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED

protected static final int OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
Flag denoting that a notification has occurred after changing the observed object or the observed attribute. This flag is used to check that the observed attribute type is correct (depending on the monitor in use) at the time of the first notification.

See Also:
Constant Field Values

RUNTIME_ERROR_NOTIFIED sample code for javax.management.monitor.Monitor.RUNTIME_ERROR_NOTIFIED

protected static final int RUNTIME_ERROR_NOTIFIED
Flag denoting that a notification has occurred after changing the observed object or the observed attribute. This flag is used to notify any exception (except the cases described above) when trying to get the value of the observed attribute at the time of the first notification.

See Also:
Constant Field Values

dbgTag sample code for javax.management.monitor.Monitor.dbgTag

@Deprecated
protected String sample code for java.lang.String definition code for java.lang.String  dbgTag
Deprecated. No replacement.
This field is retained for compatibility but should not be referenced.

Constructor Detail

Monitor sample code for javax.management.monitor.Monitor() definition code for javax.management.monitor.Monitor()

public Monitor()
Method Detail

preRegister sample code for javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName)

public ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  preRegister(MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  server,
                              ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                       throws Exception sample code for java.lang.Exception definition code for java.lang.Exception 
Allows the monitor MBean to perform any operations it needs before being registered in the MBean server.

Initializes the reference to the MBean server.

Specified by:
preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Parameters:
server - The MBean server in which the monitor MBean will be registered.
name - The object name of the monitor MBean.
Returns:
The name of the monitor MBean registered.
Throws:
Exception sample code for java.lang.Exception definition code for java.lang.Exception

postRegister sample code for javax.management.monitor.Monitor.postRegister(java.lang.Boolean) definition code for javax.management.monitor.Monitor.postRegister(java.lang.Boolean)

public void postRegister(Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  registrationDone)
Allows the monitor MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

Not used in this context.

Specified by:
postRegister sample code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) definition code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Parameters:
registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.

preDeregister sample code for javax.management.monitor.Monitor.preDeregister() definition code for javax.management.monitor.Monitor.preDeregister()

public void preDeregister()
                   throws Exception sample code for java.lang.Exception definition code for java.lang.Exception 
Allows the monitor MBean to perform any operations it needs before being unregistered by the MBean server.

Stops the monitor.

Specified by:
preDeregister sample code for javax.management.MBeanRegistration.preDeregister() definition code for javax.management.MBeanRegistration.preDeregister() in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Throws:
Exception sample code for java.lang.Exception definition code for java.lang.Exception

postDeregister sample code for javax.management.monitor.Monitor.postDeregister() definition code for javax.management.monitor.Monitor.postDeregister()

public void postDeregister()
Allows the monitor MBean to perform any operations needed after having been unregistered by the MBean server.

Not used in this context.

Specified by:
postDeregister sample code for javax.management.MBeanRegistration.postDeregister() definition code for javax.management.MBeanRegistration.postDeregister() in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration

start sample code for javax.management.monitor.Monitor.start() definition code for javax.management.monitor.Monitor.start()

public abstract void start()
Starts the monitor.

Specified by:
start sample code for javax.management.monitor.MonitorMBean.start() definition code for javax.management.monitor.MonitorMBean.start() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean

stop sample code for javax.management.monitor.Monitor.stop() definition code for javax.management.monitor.Monitor.stop()

public abstract void stop()
Stops the monitor.

Specified by:
stop sample code for javax.management.monitor.MonitorMBean.stop() definition code for javax.management.monitor.MonitorMBean.stop() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean

getObservedObject sample code for javax.management.monitor.Monitor.getObservedObject() definition code for javax.management.monitor.Monitor.getObservedObject()

@Deprecated
public ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  getObservedObject()
Deprecated. As of JMX 1.2, replaced by getObservedObjects() sample code for javax.management.monitor.Monitor.getObservedObjects() definition code for javax.management.monitor.Monitor.getObservedObjects()

Returns the object name of the first object in the set of observed MBeans, or null if there is no such object.

Specified by:
getObservedObject sample code for javax.management.monitor.MonitorMBean.getObservedObject() definition code for javax.management.monitor.MonitorMBean.getObservedObject() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Returns:
The object being observed.
See Also:
setObservedObject(ObjectName) sample code for javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName)

setObservedObject sample code for javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName)

@Deprecated
public void setObservedObject(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
                       throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Deprecated. As of JMX 1.2, replaced by addObservedObject(javax.management.ObjectName) sample code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName)

Removes all objects from the set of observed objects, and then adds the specified object.

Specified by:
setObservedObject sample code for javax.management.monitor.MonitorMBean.setObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.MonitorMBean.setObservedObject(javax.management.ObjectName) in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Parameters:
object - The object to observe.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - The specified object is null.
See Also:
getObservedObject() sample code for javax.management.monitor.Monitor.getObservedObject() definition code for javax.management.monitor.Monitor.getObservedObject()

addObservedObject sample code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName)

public void addObservedObject(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
                       throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Adds the specified object in the set of observed MBeans, if this object is not already present.

Specified by:
addObservedObject sample code for javax.management.monitor.MonitorMBean.addObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.MonitorMBean.addObservedObject(javax.management.ObjectName) in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Parameters:
object - The object to observe.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - The specified object is null.

removeObservedObject sample code for javax.management.monitor.Monitor.removeObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.removeObservedObject(javax.management.ObjectName)

public void removeObservedObject(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
Removes the specified object from the set of observed MBeans.

Specified by:
removeObservedObject sample code for javax.management.monitor.MonitorMBean.removeObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.MonitorMBean.removeObservedObject(javax.management.ObjectName) in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Parameters:
object - The object to remove.

containsObservedObject sample code for javax.management.monitor.Monitor.containsObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.Monitor.containsObservedObject(javax.management.ObjectName)

public boolean containsObservedObject(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  object)
Tests whether the specified object is in the set of observed MBeans.

Specified by:
containsObservedObject sample code for javax.management.monitor.MonitorMBean.containsObservedObject(javax.management.ObjectName) definition code for javax.management.monitor.MonitorMBean.containsObservedObject(javax.management.ObjectName) in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Parameters:
object - The object to check.
Returns:
true if the specified object is present, false otherwise.

getObservedObjects sample code for javax.management.monitor.Monitor.getObservedObjects() definition code for javax.management.monitor.Monitor.getObservedObjects()

public ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName [] getObservedObjects()
Returns an array containing the objects being observed.

Specified by:
getObservedObjects sample code for javax.management.monitor.MonitorMBean.getObservedObjects() definition code for javax.management.monitor.MonitorMBean.getObservedObjects() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Returns:
The objects being observed.

getObservedAttribute sample code for javax.management.monitor.Monitor.getObservedAttribute() definition code for javax.management.monitor.Monitor.getObservedAttribute()

public String sample code for java.lang.String definition code for java.lang.String  getObservedAttribute()
Gets the attribute being observed.
The observed attribute is not initialized by default (set to null).

Specified by:
getObservedAttribute sample code for javax.management.monitor.MonitorMBean.getObservedAttribute() definition code for javax.management.monitor.MonitorMBean.getObservedAttribute() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Returns:
The attribute being observed.
See Also:
setObservedAttribute(java.lang.String) sample code for javax.management.monitor.Monitor.setObservedAttribute(java.lang.String) definition code for javax.management.monitor.Monitor.setObservedAttribute(java.lang.String)

setObservedAttribute sample code for javax.management.monitor.Monitor.setObservedAttribute(java.lang.String) definition code for javax.management.monitor.Monitor.setObservedAttribute(java.lang.String)

public void setObservedAttribute(String sample code for java.lang.String definition code for java.lang.String  attribute)
                          throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Sets the attribute to observe.
The observed attribute is not initialized by default (set to null).

Specified by:
setObservedAttribute sample code for javax.management.monitor.MonitorMBean.setObservedAttribute(java.lang.String) definition code for javax.management.monitor.MonitorMBean.setObservedAttribute(java.lang.String) in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Parameters:
attribute - The attribute to observe.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - The specified attribute is null.
See Also:
getObservedAttribute() sample code for javax.management.monitor.Monitor.getObservedAttribute() definition code for javax.management.monitor.Monitor.getObservedAttribute()

getGranularityPeriod sample code for javax.management.monitor.Monitor.getGranularityPeriod() definition code for javax.management.monitor.Monitor.getGranularityPeriod()

public long getGranularityPeriod()
Gets the granularity period (in milliseconds).
The default value of the granularity period is 10 seconds.

Specified by:
getGranularityPeriod sample code for javax.management.monitor.MonitorMBean.getGranularityPeriod() definition code for javax.management.monitor.MonitorMBean.getGranularityPeriod() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Returns:
The granularity period value.
See Also:
setGranularityPeriod(long) sample code for javax.management.monitor.Monitor.setGranularityPeriod(long) definition code for javax.management.monitor.Monitor.setGranularityPeriod(long)

setGranularityPeriod sample code for javax.management.monitor.Monitor.setGranularityPeriod(long) definition code for javax.management.monitor.Monitor.setGranularityPeriod(long)

public void setGranularityPeriod(long period)
                          throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Sets the granularity period (in milliseconds).
The default value of the granularity period is 10 seconds.

Specified by:
setGranularityPeriod sample code for javax.management.monitor.MonitorMBean.setGranularityPeriod(long) definition code for javax.management.monitor.MonitorMBean.setGranularityPeriod(long) in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Parameters:
period - The granularity period value.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - The granularity period is less than or equal to zero.
See Also:
getGranularityPeriod() sample code for javax.management.monitor.Monitor.getGranularityPeriod() definition code for javax.management.monitor.Monitor.getGranularityPeriod()

isActive sample code for javax.management.monitor.Monitor.isActive() definition code for javax.management.monitor.Monitor.isActive()

public boolean isActive()
Tests whether the monitor MBean is active. A monitor MBean is marked active when the start sample code for javax.management.monitor.Monitor.start() definition code for javax.management.monitor.Monitor.start() method is called. It becomes inactive when the stop sample code for javax.management.monitor.Monitor.stop() definition code for javax.management.monitor.Monitor.stop() method is called.

Specified by:
isActive sample code for javax.management.monitor.MonitorMBean.isActive() definition code for javax.management.monitor.MonitorMBean.isActive() in interface MonitorMBean sample code for javax.management.monitor.MonitorMBean definition code for javax.management.monitor.MonitorMBean
Returns:
true if the monitor MBean is active, false otherwise.