public interface MonitorMBean
Exposes the remote management interface of monitor MBeans.
void start()
Starts the monitor.
void stop()
Stops the monitor.
void addObservedObject(ObjectName object) throws IllegalArgumentException
Adds the specified object in the set of observed MBeans.
object
- The object to observe.IllegalArgumentException
- the specified object is null.void removeObservedObject(ObjectName object)
Removes the specified object from the set of observed MBeans.
object
- The object to remove.boolean containsObservedObject(ObjectName object)
Tests whether the specified object is in the set of observed MBeans.
object
- The object to check.true
if the specified object is in the set, false
otherwise.ObjectName[] getObservedObjects()
Returns an array containing the objects being observed.
@Deprecated ObjectName getObservedObject()
Deprecated. As of JMX 1.2, replaced by getObservedObjects()
Gets the object name of the object being observed.
setObservedObject(javax.management.ObjectName)
@Deprecated void setObservedObject(ObjectName object)
Deprecated. As of JMX 1.2, replaced by addObservedObject(javax.management.ObjectName)
Sets the object to observe identified by its object name.
object
- The object to observe.getObservedObject()
String getObservedAttribute()
Gets the attribute being observed.
setObservedAttribute(java.lang.String)
void setObservedAttribute(String attribute)
Sets the attribute to observe.
attribute
- The attribute to observe.getObservedAttribute()
long getGranularityPeriod()
Gets the granularity period (in milliseconds).
setGranularityPeriod(long)
void setGranularityPeriod(long period) throws IllegalArgumentException
Sets the granularity period (in milliseconds).
period
- The granularity period.IllegalArgumentException
- The granularity period is less than or equal to zero.getGranularityPeriod()
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.
true
if the monitor MBean is active, false
otherwise.
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.