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
interface MonitorMBean

All Known Subinterfaces:
CounterMonitorMBean, GaugeMonitorMBean, StringMonitorMBean
All Known Implementing Classes:
Monitor, CounterMonitor, GaugeMonitor, StringMonitor

public interface MonitorMBean

Exposes the remote management interface of monitor MBeans.


Method Summary
 void

          Adds the specified object in the set of observed MBeans.
 boolean

          Tests whether the specified object is in the set of observed MBeans.
 long

          Gets the granularity period (in milliseconds).
 String

          Gets the attribute being observed.
 ObjectName

          Gets the object name of the object being observed.
 ObjectName[]

          Returns an array containing the objects being observed.
 boolean

          Tests if the monitor MBean is active.
 void

          Removes the specified object from the set of observed MBeans.
 void
setGranularityPeriod(long period)

          Sets the granularity period (in milliseconds).
 void

          Sets the attribute to observe.
 void

          Sets the object to observe identified by its object name.
 void

          Starts the monitor.
 void

          Stops the monitor.
 

Method Detail

addObservedObject

public void addObservedObject(ObjectName object)
                       throws IllegalArgumentException
Adds the specified object in the set of observed MBeans.

Parameters:
object - The object to observe.
Throws:
IllegalArgumentException - the specified object is null.

containsObservedObject

public boolean containsObservedObject(ObjectName object)
Tests whether the specified object is in the set of observed MBeans.

Parameters:
object - The object to check.
Returns:
true if the specified object is in the set, false otherwise.

getGranularityPeriod

public long getGranularityPeriod()
Gets the granularity period (in milliseconds).

Returns:
The granularity period.

getObservedAttribute

public String getObservedAttribute()
Gets the attribute being observed.

Returns:
The attribute being observed.

getObservedObject

public ObjectName getObservedObject()
Gets the object name of the object being observed.

Returns:
The object being observed.

getObservedObjects

public ObjectName[] getObservedObjects()
Returns an array containing the objects being observed.

Returns:
The objects being observed.

isActive

public boolean isActive()
Tests if the monitor MBean is active. A monitor MBean is marked active when the {@link #start start} method is called. It becomes inactive when the {@link #stop stop} method is called.

Returns:
true if the monitor MBean is active, false otherwise.

removeObservedObject

public void removeObservedObject(ObjectName object)
Removes the specified object from the set of observed MBeans.

Parameters:
object - The object to remove.

setGranularityPeriod

public void setGranularityPeriod(long period)
                          throws IllegalArgumentException
Sets the granularity period (in milliseconds).

Parameters:
period - The granularity period.
Throws:
IllegalArgumentException - The granularity period is less than or equal to zero.

setObservedAttribute

public void setObservedAttribute(String attribute)
Sets the attribute to observe.

Parameters:
attribute - The attribute to observe.

setObservedObject

public void setObservedObject(ObjectName object)
Sets the object to observe identified by its object name.

Parameters:
object - The object to observe.

start

public void start()
Starts the monitor.


stop

public void stop()
Stops the 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/.