|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--javax.management.monitor.Monitor
Defines the common part to all monitor MBeans. A monitor MBean monitors values of an attribute in an observed MBean. The observed attribute is monitored at intervals specified by the granularity period. A gauge value (derived gauge) is derived from the values of the observed attribute.
| Constructor Summary | |
Monitor()
|
|
| Method Summary | |
protected void |
_start()
|
protected void |
_stop()
|
protected abstract void |
doMonitor(java.lang.Object value)
|
long |
getGranularityPeriod()
Gets the granularity period (in milliseconds). |
java.lang.String |
getObservedAttribute()
Gets the attribute being observed. |
ObjectName |
getObservedObject()
Gets the object name of the object being observed. |
boolean |
isActive()
Tests if the monitor MBean is active. |
void |
postDeregister()
Allows the MBean to perform any operations needed after having been de-registered in the MBean server. |
void |
postRegister(java.lang.Boolean value)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. |
void |
preDeregister()
Allows the MBean to perform any operations it needs before being de-registered by the MBean server. |
ObjectName |
preRegister(MBeanServer mbeanserver,
ObjectName objectname)
Allows the MBean to perform any operations it needs before being registered in the MBean server. |
protected void |
sendNotification(java.lang.String type,
long timeStamp,
java.lang.String message,
java.lang.Object derivedValue,
java.lang.Object trigger)
|
void |
setGranularityPeriod(long period)
Sets the granularity period (in milliseconds). |
void |
setObservedAttribute(java.lang.String attribute)
Sets the attribute to observe. |
void |
setObservedObject(ObjectName objectname)
Sets the object to observe identified by its object name. |
abstract void |
start()
|
abstract void |
stop()
|
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Monitor()
| Method Detail |
public ObjectName preRegister(MBeanServer mbeanserver,
ObjectName objectname)
throws java.lang.Exception
MBeanRegistration
preRegister in interface MBeanRegistrationmbeanserver - The MBean server in which the MBean will be registered.objectname - The object name of the MBean.
java.lang.Exception - This exception should be caught by the MBean server and re-thrown
as an MBeanRegistrationException.public void postRegister(java.lang.Boolean value)
MBeanRegistration
postRegister in interface MBeanRegistrationvalue - Indicates whether or not the MBean has been successfully registered in
the MBean server. The value false means that the registration phase has failed.
public void preDeregister()
throws java.lang.Exception
MBeanRegistration
preDeregister in interface MBeanRegistrationjava.lang.Exception - This exception should be caught by the MBean server and re-thrown
as an MBeanRegistrationException.public void postDeregister()
MBeanRegistration
postDeregister in interface MBeanRegistrationpublic ObjectName getObservedObject()
MonitorMBean
getObservedObject in interface MonitorMBean
public void setObservedObject(ObjectName objectname)
throws java.lang.IllegalArgumentException
MonitorMBean
setObservedObject in interface MonitorMBeanobjectname - The object to observe.
java.lang.IllegalArgumentExceptionpublic java.lang.String getObservedAttribute()
MonitorMBean
getObservedAttribute in interface MonitorMBean
public void setObservedAttribute(java.lang.String attribute)
throws java.lang.IllegalArgumentException
MonitorMBean
setObservedAttribute in interface MonitorMBeanattribute - The attribute to observe.
java.lang.IllegalArgumentExceptionpublic long getGranularityPeriod()
MonitorMBean
getGranularityPeriod in interface MonitorMBean
public void setGranularityPeriod(long period)
throws java.lang.IllegalArgumentException
MonitorMBean
setGranularityPeriod in interface MonitorMBeanperiod - The granularity period.
java.lang.IllegalArgumentException - The granularity period is less than or equal to zero.public boolean isActive()
MonitorMBean
isActive in interface MonitorMBeantrue if the monitor MBean is active, false otherwise.public abstract void start()
public abstract void stop()
protected void sendNotification(java.lang.String type,
long timeStamp,
java.lang.String message,
java.lang.Object derivedValue,
java.lang.Object trigger)
protected void _start()
protected void _stop()
protected abstract void doMonitor(java.lang.Object value)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||