public interface

MonitorMBean

javax.management.monitor.MonitorMBean
Known Indirect Subclasses

Class Overview

Exposes the remote management interface of monitor MBeans.

Summary

Public Methods
abstract void addObservedObject(ObjectName object)
Adds the specified object in the set of observed MBeans.
abstract boolean containsObservedObject(ObjectName object)
Tests whether the specified object is in the set of observed MBeans.
abstract long getGranularityPeriod()
Gets the granularity period (in milliseconds).
abstract String getObservedAttribute()
Gets the attribute being observed.
abstract ObjectName getObservedObject()
This method is deprecated. As of JMX 1.2, replaced by getObservedObjects()
abstract ObjectName[] getObservedObjects()
Returns an array containing the objects being observed.
abstract boolean isActive()
Tests if the monitor MBean is active.
abstract void removeObservedObject(ObjectName object)
Removes the specified object from the set of observed MBeans.
abstract void setGranularityPeriod(long period)
Sets the granularity period (in milliseconds).
abstract void setObservedAttribute(String attribute)
Sets the attribute to observe.
abstract void setObservedObject(ObjectName object)
This method is deprecated. As of JMX 1.2, replaced by addObservedObject(ObjectName)
abstract void start()
Starts the monitor.
abstract void stop()
Stops the monitor.

Public Methods

public abstract void addObservedObject (ObjectName object)

Adds the specified object in the set of observed MBeans.

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

public abstract 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.

public abstract long getGranularityPeriod ()

Gets the granularity period (in milliseconds).

Returns
  • The granularity period.

public abstract String getObservedAttribute ()

Gets the attribute being observed.

Returns
  • The attribute being observed.

public abstract ObjectName getObservedObject ()

This method is deprecated.
As of JMX 1.2, replaced by getObservedObjects()

Gets the object name of the object being observed.

Returns
  • The object being observed.

public abstract ObjectName[] getObservedObjects ()

Returns an array containing the objects being observed.

Returns
  • The objects being observed.

public abstract boolean isActive ()

Tests if the monitor MBean is active. A monitor MBean is marked active when the start method is called. It becomes inactive when the stop method is called.

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

public abstract void removeObservedObject (ObjectName object)

Removes the specified object from the set of observed MBeans.

Parameters
object The object to remove.

public abstract void setGranularityPeriod (long period)

Sets the granularity period (in milliseconds).

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

public abstract void setObservedAttribute (String attribute)

Sets the attribute to observe.

Parameters
attribute The attribute to observe.

public abstract void setObservedObject (ObjectName object)

This method is deprecated.
As of JMX 1.2, replaced by addObservedObject(ObjectName)

Sets the object to observe identified by its object name.

Parameters
object The object to observe.

public abstract void start ()

Starts the monitor.

public abstract void stop ()

Stops the monitor.