- Monitor class in java
- Field Summary
- Constructor Summary
- Method Summary
- Methods declared in class javax.management.NotificationBroadcasterSupport
- Methods declared in class java.lang.Object
- Methods declared in interface javax.management.NotificationBroadcaster
- Methods declared in interface javax.management.NotificationEmitter
- Field Detail
- capacityIncrement
- elementCount
- alreadyNotified
- alreadyNotifieds
- server
- RESET_FLAGS_ALREADY_NOTIFIED
- OBSERVED_OBJECT_ERROR_NOTIFIED
- OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
- OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
- RUNTIME_ERROR_NOTIFIED
- dbgTag
- Class Monitor
- Field Summary
- Constructor Summary
- Method Summary
- Methods declared in class javax.management.NotificationBroadcasterSupport
- Methods declared in class java.lang.Object
- Field Details
- capacityIncrement
- elementCount
- alreadyNotified
- alreadyNotifieds
- server
- RESET_FLAGS_ALREADY_NOTIFIED
- OBSERVED_OBJECT_ERROR_NOTIFIED
- OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
- OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
- RUNTIME_ERROR_NOTIFIED
- dbgTag
- Constructor Details
- Monitor
- Method Details
- preRegister
- postRegister
- preDeregister
- postDeregister
- start
- stop
- getObservedObject
- setObservedObject
- addObservedObject
- removeObservedObject
- containsObservedObject
- getObservedObjects
- getObservedAttribute
- setObservedAttribute
- getGranularityPeriod
- setGranularityPeriod
- isActive
- Monitor class in java
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class javax.management.NotificationBroadcasterSupport
- Methods inherited from class java.lang.Object
- Field Detail
- capacityIncrement
- elementCount
- alreadyNotified
- alreadyNotifieds
- server
- RESET_FLAGS_ALREADY_NOTIFIED
- OBSERVED_OBJECT_ERROR_NOTIFIED
- OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
- OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
- RUNTIME_ERROR_NOTIFIED
- dbgTag
Monitor class in java
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.
Field Summary
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
Constructor Summary
Method Summary
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.
Methods declared in class javax.management.NotificationBroadcasterSupport
Methods declared in class java.lang.Object
Methods declared in interface javax.management.NotificationBroadcaster
Methods declared in interface javax.management.NotificationEmitter
Field Detail
capacityIncrement
protected static final int capacityIncrement
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
elementCount
protected int elementCount
alreadyNotified
@Deprecated protected int alreadyNotified
alreadyNotifieds
protected int[] alreadyNotifieds
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.
server
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.
RESET_FLAGS_ALREADY_NOTIFIED
protected static final int RESET_FLAGS_ALREADY_NOTIFIED
OBSERVED_OBJECT_ERROR_NOTIFIED
protected static final int OBSERVED_OBJECT_ERROR_NOTIFIED
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.
OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
protected static final int OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
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.
OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
protected static final int OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
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.
RUNTIME_ERROR_NOTIFIED
protected static final int RUNTIME_ERROR_NOTIFIED
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.
dbgTag
Class 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.
Field Summary
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
Constructor Summary
Method Summary
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.
Methods declared in class javax.management.NotificationBroadcasterSupport
Methods declared in class java.lang.Object
Field Details
capacityIncrement
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
elementCount
alreadyNotified
alreadyNotifieds
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.
server
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.
RESET_FLAGS_ALREADY_NOTIFIED
OBSERVED_OBJECT_ERROR_NOTIFIED
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.
OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
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.
OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
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.
RUNTIME_ERROR_NOTIFIED
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.
dbgTag
Constructor Details
Monitor
Method Details
preRegister
Allows the monitor MBean to perform any operations it needs before being registered in the MBean server. Initializes the reference to the MBean server.
postRegister
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.
preDeregister
Allows the monitor MBean to perform any operations it needs before being unregistered by the MBean server. Stops the monitor.
postDeregister
Allows the monitor MBean to perform any operations needed after having been unregistered by the MBean server. Not used in this context.
start
stop
getObservedObject
Returns the object name of the first object in the set of observed MBeans, or null if there is no such object.
setObservedObject
addObservedObject
removeObservedObject
containsObservedObject
getObservedObjects
getObservedAttribute
Gets the attribute being observed.
The observed attribute is not initialized by default (set to null).
setObservedAttribute
getGranularityPeriod
Gets the granularity period (in milliseconds).
The default value of the granularity period is 10 seconds.
setGranularityPeriod
Sets the granularity period (in milliseconds).
The default value of the granularity period is 10 seconds.
isActive
Tests whether 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.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
Monitor class in java
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.
Field Summary
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
Constructor Summary
Method Summary
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.
Methods inherited from class javax.management.NotificationBroadcasterSupport
Methods inherited from class java.lang.Object
Field Detail
capacityIncrement
protected static final int capacityIncrement
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
elementCount
protected int elementCount
alreadyNotified
@Deprecated protected int alreadyNotified
alreadyNotifieds
protected int[] alreadyNotifieds
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.
server
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.
RESET_FLAGS_ALREADY_NOTIFIED
protected static final int RESET_FLAGS_ALREADY_NOTIFIED
OBSERVED_OBJECT_ERROR_NOTIFIED
protected static final int OBSERVED_OBJECT_ERROR_NOTIFIED
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.
OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
protected static final int OBSERVED_ATTRIBUTE_ERROR_NOTIFIED
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.
OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
protected static final int OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED
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.
RUNTIME_ERROR_NOTIFIED
protected static final int RUNTIME_ERROR_NOTIFIED
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.