Top Description Methods
javax.management.monitor

public Interface MonitorMBean

Known Direct Subinterfaces
javax.management.monitor.StringMonitorMBean, javax.management.monitor.CounterMonitorMBean, javax.management.monitor.GaugeMonitorMBean
Known Direct Implementers
javax.management.monitor.Monitor
Imports
javax.management.ObjectName

Exposes the remote management interface of monitor MBeans.
Since
1.5

Method Summary

Modifier and TypeMethod and Description
public void
addObservedObject(ObjectName
The object to observe.
object
)

Adds the specified object in the set of observed MBeans.

public boolean

Returns:

true if the specified object is in the set, false otherwise.
containsObservedObject
(ObjectName
The object to check.
object
)

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

public long

Returns:

The granularity period.
getGranularityPeriod
()

Gets the granularity period (in milliseconds).

public String

Returns:

The attribute being observed.
getObservedAttribute
()

Gets the attribute being observed.

public ObjectName

Returns:

The object being observed.
getObservedObject
()
Deprecated As of JMX 1.2, replaced by getObservedObjects

Gets the object name of the object being observed.

public ObjectName[]

Returns:

The objects being observed.
getObservedObjects
()

Returns an array containing the objects being observed.

public boolean

Returns:

true if the monitor MBean is active, false otherwise.
isActive
()

Tests if the monitor MBean is active.

public void
removeObservedObject(ObjectName
The object to remove.
object
)

Removes the specified object from the set of observed MBeans.

public void
setGranularityPeriod(long
The granularity period.
period
)

Sets the granularity period (in milliseconds).

public void
setObservedAttribute(String
The attribute to observe.
attribute
)

Sets the attribute to observe.

public void
setObservedObject(ObjectName
The object to observe.
object
)
Deprecated As of JMX 1.2, replaced by addObservedObject

Sets the object to observe identified by its object name.

public void
start()

Starts the monitor.

public void
stop()

Stops the monitor.

Method Detail

addObservedObjectback to summary
public void addObservedObject(ObjectName object) throws IllegalArgumentException

Adds the specified object in the set of observed MBeans.

Parameters
object:ObjectName

The object to observe.

Exceptions
IllegalArgumentException:
the specified object is null.
containsObservedObjectback to summary
public boolean containsObservedObject(ObjectName object)

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

Parameters
object:ObjectName

The object to check.

Returns:boolean

true if the specified object is in the set, false otherwise.

getGranularityPeriodback to summary
public long getGranularityPeriod()

Gets the granularity period (in milliseconds).

Returns:long

The granularity period.

See Also
setGranularityPeriod
getObservedAttributeback to summary
public String getObservedAttribute()

Gets the attribute being observed.

Returns:String

The attribute being observed.

See Also
setObservedAttribute
getObservedObjectback to summary
public ObjectName getObservedObject()

Deprecated

As of JMX 1.2, replaced by getObservedObjects

Gets the object name of the object being observed.

Returns:ObjectName

The object being observed.

Annotations
@Deprecated
See Also
setObservedObject
getObservedObjectsback to summary
public ObjectName[] getObservedObjects()

Returns an array containing the objects being observed.

Returns:ObjectName[]

The objects being observed.

isActiveback to summary
public 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:boolean

true if the monitor MBean is active, false otherwise.

removeObservedObjectback to summary
public void removeObservedObject(ObjectName object)

Removes the specified object from the set of observed MBeans.

Parameters
object:ObjectName

The object to remove.

setGranularityPeriodback to summary
public void setGranularityPeriod(long period) throws IllegalArgumentException

Sets the granularity period (in milliseconds).

Parameters
period:long

The granularity period.

Exceptions
IllegalArgumentException:
The granularity period is less than or equal to zero.
See Also
getGranularityPeriod
setObservedAttributeback to summary
public void setObservedAttribute(String attribute)

Sets the attribute to observe.

Parameters
attribute:String

The attribute to observe.

See Also
getObservedAttribute
setObservedObjectback to summary
public void setObservedObject(ObjectName object)

Deprecated

As of JMX 1.2, replaced by addObservedObject

Sets the object to observe identified by its object name.

Parameters
object:ObjectName

The object to observe.

Annotations
@Deprecated
See Also
getObservedObject
startback to summary
public void start()

Starts the monitor.

stopback to summary
public void stop()

Stops the monitor.