java.lang.Object | ||
↳ | javax.management.NotificationBroadcasterSupport | |
↳ | javax.management.monitor.Monitor |
![]() |
Defines the part common to all monitor MBeans. A monitor MBean monitors values of an attribute common to a set of observed MBeans. 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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | OBSERVED_ATTRIBUTE_ERROR_NOTIFIED | Flag denoting that a notification has occurred after changing the observed attribute. | |||||||||
int | OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED | Flag denoting that a notification has occurred after changing the observed object or the observed attribute. | |||||||||
int | OBSERVED_OBJECT_ERROR_NOTIFIED | Flag denoting that a notification has occurred after changing the observed object. | |||||||||
int | RESET_FLAGS_ALREADY_NOTIFIED | This flag is used to reset the alreadyNotifieds monitor attribute. |
|||||||||
int | RUNTIME_ERROR_NOTIFIED | Flag denoting that a notification has occurred after changing the observed object or the observed attribute. | |||||||||
int | capacityIncrement | The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
alreadyNotified |
This field is deprecated.
equivalent to alreadyNotifieds [0].
|
||||||||||
alreadyNotifieds | Selected monitor errors that have already been notified. |
||||||||||
dbgTag | This field is deprecated. No replacement. | ||||||||||
elementCount | The number of valid components in the vector of observed objects. | ||||||||||
server | Reference to the MBean server. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the specified object in the set of observed MBeans, if this object
is not already present.
| |||||||||||
Tests whether the specified object is in the set of observed MBeans.
| |||||||||||
Gets the granularity period (in milliseconds).
| |||||||||||
Gets the attribute being observed.
| |||||||||||
This method is deprecated.
As of JMX 1.2, replaced by
getObservedObjects()
| |||||||||||
Returns an array containing the objects being observed.
| |||||||||||
Tests whether the monitor MBean is active.
| |||||||||||
Allows the monitor MBean to perform any operations needed after
having been unregistered by the MBean server.
| |||||||||||
Allows the monitor MBean to perform any operations needed after
having been registered in the MBean server or after the
registration has failed.
| |||||||||||
Allows the monitor MBean to perform any operations it needs
before being unregistered by the MBean server.
| |||||||||||
Allows the monitor MBean to perform any operations it needs
before being registered in the MBean server.
| |||||||||||
Removes the specified object from the set of observed MBeans.
| |||||||||||
Sets the granularity period (in milliseconds).
| |||||||||||
Sets the attribute to observe.
| |||||||||||
This method is deprecated.
As of JMX 1.2, replaced by
addObservedObject(ObjectName)
| |||||||||||
Starts the monitor.
| |||||||||||
Stops the monitor.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Flag denoting that a notification has occurred after changing the observed attribute. This flag is used to check that the new observed attribute belongs to the observed object at the time of the first notification.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute. This flag is used to check that the observed attribute type is correct (depending on the monitor in use) at the time of the first notification.
Flag denoting that a notification has occurred after changing the observed object. This flag is used to check that the new observed object is registered in the MBean server at the time of the first notification.
This flag is used to reset the alreadyNotifieds
monitor attribute.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute. This flag is used to notify any exception (except the cases described above) when trying to get the value of the observed attribute at the time of the first notification.
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
This field is deprecated.
equivalent to alreadyNotifieds
[0].
Monitor errors that have already been notified.
Selected monitor errors that have already been notified.
Each element in this array corresponds to an observed object
in the vector. It contains a bit mask of the flags OBSERVED_OBJECT_ERROR_NOTIFIED
etc, indicating whether the
corresponding notification has already been sent for the MBean
being monitored.
This field is deprecated.
No replacement.
This field is retained for compatibility but should not be referenced.
The number of valid components in the vector of observed objects.
Reference to the MBean server. This reference is null when the monitor MBean is not registered in an MBean server. This reference is initialized before the monitor MBean is registered in the MBean server.
Adds the specified object in the set of observed MBeans, if this object is not already present.
object | The object to observe. |
---|
IllegalArgumentException | The specified object is null. |
---|
Tests whether the specified object is in the set of observed MBeans.
object | The object to check. |
---|
true
if the specified object is present,
false
otherwise.
Gets the granularity period (in milliseconds).
The default value of the granularity period is 10 seconds.
Gets the attribute being observed.
The observed attribute is not initialized by default (set to null).
This method is deprecated.
As of JMX 1.2, replaced by getObservedObjects()
Returns the object name of the first object in the set of observed
MBeans, or null
if there is no such object.
Returns an array containing the objects being observed.
Allows the monitor MBean to perform any operations needed after having been unregistered by the MBean server.
Not used in this context.
Allows the monitor MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Not used in this context.
registrationDone | Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed. |
---|
Allows the monitor MBean to perform any operations it needs before being unregistered by the MBean server.
Stops the monitor.
Exception |
---|
Allows the monitor MBean to perform any operations it needs before being registered in the MBean server.
Initializes the reference to the MBean server.
server | The MBean server in which the monitor MBean will be registered. |
---|---|
name | The object name of the monitor MBean. |
Exception |
---|
Removes the specified object from the set of observed MBeans.
object | The object to remove. |
---|
Sets the granularity period (in milliseconds).
The default value of the granularity period is 10 seconds.
period | The granularity period value. |
---|
IllegalArgumentException | The granularity period is less than or equal to zero. |
---|
Sets the attribute to observe.
The observed attribute is not initialized by default (set to null).
attribute | The attribute to observe. |
---|
IllegalArgumentException | The specified attribute is null. |
---|
This method is deprecated.
As of JMX 1.2, replaced by addObservedObject(ObjectName)
Removes all objects from the set of observed objects, and then adds the specified object.
object | The object to observe. |
---|
IllegalArgumentException | The specified object is null. |
---|
Starts the monitor.
Stops the monitor.