Interface MonitorMBean
- All Known Subinterfaces:
- CounterMonitorMBean,- GaugeMonitorMBean,- StringMonitorMBean
- All Known Implementing Classes:
- CounterMonitor,- GaugeMonitor,- Monitor,- StringMonitor
public interface MonitorMBean
Exposes the remote management interface of monitor MBeans.
- Since:
- 1.5
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddObservedObject(ObjectName object) Adds the specified object in the set of observed MBeans.booleancontainsObservedObject(ObjectName object) Tests whether the specified object is in the set of observed MBeans.longGets the granularity period (in milliseconds).Gets the attribute being observed.Deprecated.Returns an array containing the objects being observed.booleanisActive()Tests if the monitor MBean is active.voidremoveObservedObject(ObjectName object) Removes the specified object from the set of observed MBeans.voidsetGranularityPeriod(long period) Sets the granularity period (in milliseconds).voidsetObservedAttribute(String attribute) Sets the attribute to observe.voidsetObservedObject(ObjectName object) Deprecated.As of JMX 1.2, replaced byaddObservedObject(javax.management.ObjectName)voidstart()Starts the monitor.voidstop()Stops the monitor.
- 
Method Details- 
startvoid start()Starts the monitor.
- 
stopvoid stop()Stops the monitor.
- 
addObservedObjectAdds the specified object in the set of observed MBeans.- Parameters:
- object- The object to observe.
- Throws:
- IllegalArgumentException- the specified object is null.
 
- 
removeObservedObjectRemoves the specified object from the set of observed MBeans.- Parameters:
- object- The object to remove.
 
- 
containsObservedObjectTests whether the specified object is in the set of observed MBeans.- Parameters:
- object- The object to check.
- Returns:
- trueif the specified object is in the set,- falseotherwise.
 
- 
getObservedObjectsObjectName[] getObservedObjects()Returns an array containing the objects being observed.- Returns:
- The objects being observed.
 
- 
getObservedObjectDeprecated.As of JMX 1.2, replaced bygetObservedObjects()Gets the object name of the object being observed.- Returns:
- The object being observed.
- See Also:
 
- 
setObservedObjectDeprecated.As of JMX 1.2, replaced byaddObservedObject(javax.management.ObjectName)Sets the object to observe identified by its object name.- Parameters:
- object- The object to observe.
- See Also:
 
- 
getObservedAttributeString getObservedAttribute()Gets the attribute being observed.- Returns:
- The attribute being observed.
- See Also:
 
- 
setObservedAttributeSets the attribute to observe.- Parameters:
- attribute- The attribute to observe.
- See Also:
 
- 
getGranularityPeriodlong getGranularityPeriod()Gets the granularity period (in milliseconds).- Returns:
- The granularity period.
- See Also:
 
- 
setGranularityPeriodSets the granularity period (in milliseconds).- Parameters:
- period- The granularity period.
- Throws:
- IllegalArgumentException- The granularity period is less than or equal to zero.
- See Also:
 
- 
isActive
 
- 
getObservedObjects()