API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.management.monitor. Monitor View Source
Author(s)
Sun Microsystems, Inc
Since
1.5
Version
4.55 12/29/05
Serial
Hierarchy
 Object
      NotificationBroadcasterSupport
          Monitor
Implements
 MonitorMBean
 MBeanRegistration
Subclasses
Description
publicabstract abstract class Monitor
  Defines the part common to all monitor MBeans.
See also:   
Constructors
public Monitor ()
Methods
Hide/Show inherited methods
public void addNotificationListener (NotificationListener listener, NotificationFilter filter, Object handback) [Inherited From NotificationBroadcasterSupport]
  Adds a listener.
publicsynchronized void addObservedObject (ObjectName object) throws IllegalArgumentException [Specified in MonitorMBean]
  Adds the specified object in the set of observed MBeans, if this object is not already present.
pack-private MonitorNotification buildAlarmNotification (ObjectName object, String attribute, Comparable<Object> value)
pack-private String buildErrorNotification (ObjectName object, String attribute, Comparable<Object> value)
pack-privatestatic Class<Number> classForType (NumericalType type)
pack-privatesynchronized int computeAlreadyNotifiedIndex (ObservedObject o, int index, int[] an)
  Check if the Monitor.alreadyNotifieds array has been modified.
publicsynchronized boolean containsObservedObject (ObjectName object) [Specified in MonitorMBean]
  Tests whether the specified object is in the set of observed MBeans.
pack-privatesynchronized void createAlreadyNotified ()
Create the Monitor.alreadyNotified array from the ObservedObject array list.
pack-private ObservedObject createObservedObject (ObjectName object)
  Factory method for ObservedObject creation.
pack-private void debug (String func, String info)
pack-privatestatic void debug (String clz, String func, String info)
pack-private void doStart ()
Starts the monitor.
pack-private void doStop ()
Stops the monitor.
pack-private Object getAttribute (MBeanServerConnection mbsc, ObjectName object, String attribute) throws AttributeNotFoundException InstanceNotFoundException MBeanException ReflectionException IOException
pack-private Comparable<Object> getComparableFromAttribute (ObjectName object, String attribute, Object value) throws AttributeNotFoundException
pack-privatesynchronized Object getDerivedGauge (ObjectName object)
  Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, or null otherwise.
pack-private Comparable<Object> getDerivedGaugeFromComparable (ObjectName object, String attribute, Comparable<Object> value)
pack-privatesynchronized long getDerivedGaugeTimeStamp (ObjectName object)
  Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or 0 otherwise.
publicsynchronized long getGranularityPeriod () [Specified in MonitorMBean]
  Gets the granularity period (in milliseconds).
public MBeanNotificationInfo getNotificationInfo () [Inherited From NotificationBroadcasterSupport]
publicsynchronized String getObservedAttribute () [Specified in MonitorMBean]
  Gets the attribute being observed.
@Deprecated
publicsynchronized ObjectName getObservedObject () [Specified in MonitorMBean]
  Returns the object name of the first object in the set of observed MBeans, or null if there is no such object.
pack-privatesynchronized ObservedObject getObservedObject (ObjectName object)
  Get the specified ObservedObject if this object is contained in the set of observed MBeans, or null otherwise.
publicsynchronized ObjectName getObservedObjects () [Specified in MonitorMBean]
  Returns an array containing the objects being observed.
protected void handleNotification (NotificationListener listener, Notification notif, Object handback) [Inherited From NotificationBroadcasterSupport]
  This method is called by sendNotification for each listener in order to send the notification to that listener.
pack-private Object introspect (ObjectName object, String attribute, Object value) throws AttributeNotFoundException
publicsynchronized boolean isActive () [Specified in MonitorMBean]
  Tests whether the monitor MBean is active.
pack-privatesynchronized boolean isAlreadyNotified (ObservedObject o, int mask)
Check if the given bits in the given element of Monitor.alreadyNotifieds are set.
pack-private boolean isComparableTypeValid (ObjectName object, String attribute, Comparable<Object> value)
pack-privatestatic boolean isDebugOn ()
pack-private boolean isThresholdTypeValid (ObjectName object, String attribute, Comparable<Object> value)
pack-privatestatic boolean isTraceOn ()
pack-privatestatic boolean isValidForType (Object value, Class<Number> c)
pack-private void onErrorNotification (MonitorNotification notification)
public void postDeregister () [Specified in MBeanRegistration]
  Allows the monitor MBean to perform any operations needed after having been unregistered by the MBean server.
public void postRegister (Boolean registrationDone) [Specified in MBeanRegistration]
  Allows the monitor MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
public void preDeregister () throws Exception [Specified in MBeanRegistration]
  Allows the monitor MBean to perform any operations it needs before being unregistered by the MBean server.
public ObjectName preRegister (MBeanServer server, ObjectName name) throws Exception [Specified in MBeanRegistration]
  Allows the monitor MBean to perform any operations it needs before being registered in the MBean server.
public void removeNotificationListener (NotificationListener listener) throws ListenerNotFoundException [Inherited From NotificationBroadcasterSupport]
public void removeNotificationListener (NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException [Inherited From NotificationBroadcasterSupport]
publicsynchronized void removeObservedObject (ObjectName object) [Specified in MonitorMBean]
  Removes the specified object from the set of observed MBeans.
pack-privatesynchronized void resetAllAlreadyNotified (ObservedObject o, int index, int[] an)
  Reset all bits in the given element of Monitor.alreadyNotifieds.
pack-privatesynchronized void resetAlreadyNotified (ObservedObject o, int index, int mask)
  Reset the given bits in the given element of Monitor.alreadyNotifieds.
public void sendNotification (Notification notification) [Inherited From NotificationBroadcasterSupport]
  Sends a notification.
pack-privatesynchronized void setAlreadyNotified (ObservedObject o, int index, int mask, int[] an)
  Set the given bits in the given element of Monitor.alreadyNotifieds.
publicsynchronized void setGranularityPeriod (long period) throws IllegalArgumentException [Specified in MonitorMBean]
  Sets the granularity period (in milliseconds).
public void setObservedAttribute (String attribute) throws IllegalArgumentException [Specified in MonitorMBean]
  Sets the attribute to observe.
@Deprecated
publicsynchronized void setObservedObject (ObjectName object) throws IllegalArgumentException [Specified in MonitorMBean]
  Removes all objects from the set of observed objects, and then adds the specified object.
publicabstract void start () [Specified in MonitorMBean]
Starts the monitor.
publicabstract void stop () [Specified in MonitorMBean]
Stops the monitor.
pack-private void trace (String func, String info)
pack-privatestatic void trace (String clz, String func, String info)
pack-privatesynchronized void updateAlreadyNotified (ObservedObject o, int index)
  Update the Monitor.alreadyNotifieds array element at the given index with the already notified flag in the given ObservedObject.
pack-privatesynchronized void updateDeprecatedAlreadyNotified ()
Update the deprecated Monitor.alreadyNotified field.
Fields
Hide/Show inherited fields
@Deprecated
protected int alreadyNotified
Monitor errors that have already been notified.
protected int alreadyNotifieds
  Selected monitor errors that have already been notified.
protectedfinalstatic int capacityIncrement = "16"
The amount by which the capacity of the monitor arrays are automatically incremented when their size becomes greater than their capacity.
@Deprecated
protected String dbgTag
This field is retained for compatibility but should not be referenced.
protected int elementCount
The number of valid components in the vector of observed objects.
pack-privatefinalstatic Integer INTEGER_ZERO
Constant used to initialize all the numeric values.
protectedfinalstatic int OBSERVED_ATTRIBUTE_ERROR_NOTIFIED = "2"
  Flag denoting that a notification has occurred after changing the observed attribute.
protectedfinalstatic int OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED = "4"
  Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
protectedfinalstatic int OBSERVED_OBJECT_ERROR_NOTIFIED = "1"
  Flag denoting that a notification has occurred after changing the observed object.
pack-privatefinal List<ObservedObject> observedObjects
List of ObservedObjects to which the attribute to observe belongs.
protectedfinalstatic int RESET_FLAGS_ALREADY_NOTIFIED = "0"
This flag is used to reset the alreadyNotifieds monitor attribute.
protectedfinalstatic int RUNTIME_ERROR_NOTIFIED = "8"
  Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
protected MBeanServer server
  Reference to the MBean server.
pack-privatefinalstatic int THRESHOLD_ERROR_NOTIFIED = "16"
  Flag denoting that a notification has occurred after changing the threshold.
Nested Classes
  Monitor.ObservedObject
  Monitor.NumericalType
Enumeration used to keep trace of the derived gauge type in counter and gauge monitors.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar