API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.management.monitor. CounterMonitor View Source
Author(s)
Sun Microsystems, Inc
Since
1.5
Version
1.79 11/17/05
Serial
Hierarchy
 Object
      NotificationBroadcasterSupport
          Monitor
              CounterMonitor
Implements
 CounterMonitorMBean
Subclasses
Description
public class CounterMonitor
  Defines a monitor MBean designed to observe the values of a counter attribute.
See also:   
Constructors
public CounterMonitor ()
Default constructor.
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 [Inherited From Monitor]
  Adds the specified object in the set of observed MBeans, if this object is not already present.
@Override
pack-privatesynchronized MonitorNotification buildAlarmNotification (ObjectName object, String attribute, Comparable<Object> value) [Overrides Monitor]
pack-private String buildErrorNotification (ObjectName object, String attribute, Comparable<Object> value) [Inherited From Monitor]
pack-privatestatic Class<Number> classForType (NumericalType type) [Inherited From Monitor]
pack-privatesynchronized int computeAlreadyNotifiedIndex (ObservedObject o, int index, int[] an) [Inherited From Monitor]
  Check if the Monitor.alreadyNotifieds array has been modified.
publicsynchronized boolean containsObservedObject (ObjectName object) [Inherited From Monitor]
  Tests whether the specified object is in the set of observed MBeans.
pack-privatesynchronized void createAlreadyNotified () [Inherited From Monitor]
Create the Monitor.alreadyNotified array from the ObservedObject array list.
@Override
pack-private ObservedObject createObservedObject (ObjectName object) [Overrides Monitor]
  Factory method for ObservedObject creation.
pack-private void debug (String func, String info) [Inherited From Monitor]
pack-privatestatic void debug (String clz, String func, String info) [Inherited From Monitor]
pack-private void doStart () [Inherited From Monitor]
Starts the monitor.
pack-private void doStop () [Inherited From Monitor]
Stops the monitor.
pack-private Comparable<Object> getComparableFromAttribute (ObjectName object, String attribute, Object value) throws AttributeNotFoundException [Inherited From Monitor]
@Deprecated
publicsynchronized Number getDerivedGauge () [Specified in CounterMonitorMBean]
  Returns the derived gauge of the first object in the set of observed MBeans.
publicsynchronized Number getDerivedGauge (ObjectName object) [Overrides Monitor] [Specified in CounterMonitorMBean]
  Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, or null otherwise.
@Override
pack-privatesynchronized Comparable<Object> getDerivedGaugeFromComparable (ObjectName object, String attribute, Comparable<Object> value) [Overrides Monitor]
@Deprecated
publicsynchronized long getDerivedGaugeTimeStamp () [Specified in CounterMonitorMBean]
  Gets the derived gauge timestamp of the first object in the set of observed MBeans.
publicsynchronized long getDerivedGaugeTimeStamp (ObjectName object) [Overrides Monitor] [Specified in CounterMonitorMBean]
  Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or 0 otherwise.
publicsynchronized boolean getDifferenceMode () [Specified in CounterMonitorMBean]
  Gets the difference mode flag value common to all observed MBeans.
publicsynchronized long getGranularityPeriod () [Inherited From Monitor]
  Gets the granularity period (in milliseconds).
publicsynchronized Number getInitThreshold () [Specified in CounterMonitorMBean]
  Gets the initial threshold value common to all observed objects.
publicsynchronized Number getModulus () [Specified in CounterMonitorMBean]
  Gets the modulus value common to all observed MBeans.
public MBeanNotificationInfo getNotificationInfo () [Overrides NotificationBroadcasterSupport]
Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent by the counter monitor.
publicsynchronized boolean getNotify () [Specified in CounterMonitorMBean]
  Gets the notification's on/off switch value common to all observed MBeans.
publicsynchronized String getObservedAttribute () [Inherited From Monitor]
  Gets the attribute being observed.
@Deprecated
publicsynchronized ObjectName getObservedObject () [Inherited From Monitor]
  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) [Inherited From Monitor]
  Get the specified ObservedObject if this object is contained in the set of observed MBeans, or null otherwise.
publicsynchronized ObjectName getObservedObjects () [Inherited From Monitor]
  Returns an array containing the objects being observed.
publicsynchronized Number getOffset () [Specified in CounterMonitorMBean]
  Gets the offset value common to all observed MBeans.
@Deprecated
publicsynchronized Number getThreshold () [Specified in CounterMonitorMBean]
  Gets the threshold value of the first object in the set of observed MBeans.
publicsynchronized Number getThreshold (ObjectName object) [Specified in CounterMonitorMBean]
  Gets the current threshold value of the specified object, if this object is contained in the set of observed MBeans, or null otherwise.
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 [Inherited From Monitor]
publicsynchronized boolean isActive () [Inherited From Monitor]
  Tests whether the monitor MBean is active.
pack-privatesynchronized boolean isAlreadyNotified (ObservedObject o, int mask) [Inherited From Monitor]
Check if the given bits in the given element of Monitor.alreadyNotifieds are set.
@Override
pack-privatesynchronized boolean isComparableTypeValid (ObjectName object, String attribute, Comparable<Object> value) [Overrides Monitor]
This method globally sets the derived gauge type for the given "object" and "attribute" after checking that the type of the supplied observed attribute value is one of the value types supported by this monitor.
pack-privatestatic boolean isDebugOn () [Inherited From Monitor]
@Override
pack-privatesynchronized boolean isThresholdTypeValid (ObjectName object, String attribute, Comparable<Object> value) [Overrides Monitor]
  Tests if the threshold, offset and modulus of the specified observed object are of the same type as the counter.
pack-privatestatic boolean isTraceOn () [Inherited From Monitor]
pack-privatestatic boolean isValidForType (Object value, Class<Number> c) [Inherited From Monitor]
pack-private String makeDebugTag ()
@Override
pack-privatesynchronized void onErrorNotification (MonitorNotification notification) [Overrides Monitor]
public void postDeregister () [Inherited From Monitor]
  Allows the monitor MBean to perform any operations needed after having been unregistered by the MBean server.
public void postRegister (Boolean registrationDone) [Inherited From Monitor]
  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 [Inherited From Monitor]
  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 [Inherited From Monitor]
  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) [Inherited From Monitor]
  Removes the specified object from the set of observed MBeans.
pack-privatesynchronized void resetAllAlreadyNotified (ObservedObject o, int index, int[] an) [Inherited From Monitor]
  Reset all bits in the given element of Monitor.alreadyNotifieds.
pack-privatesynchronized void resetAlreadyNotified (ObservedObject o, int index, int mask) [Inherited From Monitor]
  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) [Inherited From Monitor]
  Set the given bits in the given element of Monitor.alreadyNotifieds.
publicsynchronized void setDifferenceMode (boolean value) [Specified in CounterMonitorMBean]
  Sets the difference mode flag value common to all observed MBeans.
publicsynchronized void setGranularityPeriod (long period) throws IllegalArgumentException [Inherited From Monitor]
  Sets the granularity period (in milliseconds).
publicsynchronized void setInitThreshold (Number value) throws IllegalArgumentException [Specified in CounterMonitorMBean]
  Sets the initial threshold value common to all observed objects.
publicsynchronized void setModulus (Number value) throws IllegalArgumentException [Specified in CounterMonitorMBean]
  Sets the modulus value common to all observed MBeans.
publicsynchronized void setNotify (boolean value) [Specified in CounterMonitorMBean]
  Sets the notification's on/off switch value common to all observed MBeans.
public void setObservedAttribute (String attribute) throws IllegalArgumentException [Inherited From Monitor]
  Sets the attribute to observe.
@Deprecated
publicsynchronized void setObservedObject (ObjectName object) throws IllegalArgumentException [Inherited From Monitor]
  Removes all objects from the set of observed objects, and then adds the specified object.
publicsynchronized void setOffset (Number value) throws IllegalArgumentException [Specified in CounterMonitorMBean]
  Sets the offset value common to all observed MBeans.
@Deprecated
publicsynchronized void setThreshold (Number value) throws IllegalArgumentException [Specified in CounterMonitorMBean]
  Sets the initial threshold value.
publicsynchronized void start () [Specified in Monitor]
Starts the counter monitor.
publicsynchronized void stop () [Specified in Monitor]
Stops the counter monitor.
pack-private void trace (String func, String info) [Inherited From Monitor]
pack-privatestatic void trace (String clz, String func, String info) [Inherited From Monitor]
pack-privatesynchronized void updateAlreadyNotified (ObservedObject o, int index) [Inherited From Monitor]
  Update the Monitor.alreadyNotifieds array element at the given index with the already notified flag in the given ObservedObject.
pack-privatesynchronized void updateDeprecatedAlreadyNotified () [Inherited From Monitor]
Update the deprecated Monitor.alreadyNotified field.
Fields
Hide/Show inherited fields
@Deprecated
protected int alreadyNotified [Inherited From Monitor]
Monitor errors that have already been notified.
protected int alreadyNotifieds [Inherited From Monitor]
  Selected monitor errors that have already been notified.
protectedfinalstatic int capacityIncrement = "16" [Inherited From Monitor]
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 [Inherited From Monitor]
This field is retained for compatibility but should not be referenced.
protected int elementCount [Inherited From Monitor]
The number of valid components in the vector of observed objects.
pack-privatefinalstatic Integer INTEGER_ZERO [Inherited From Monitor]
Constant used to initialize all the numeric values.
protectedfinalstatic int OBSERVED_ATTRIBUTE_ERROR_NOTIFIED = "2" [Inherited From Monitor]
  Flag denoting that a notification has occurred after changing the observed attribute.
protectedfinalstatic int OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED = "4" [Inherited From Monitor]
  Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
protectedfinalstatic int OBSERVED_OBJECT_ERROR_NOTIFIED = "1" [Inherited From Monitor]
  Flag denoting that a notification has occurred after changing the observed object.
pack-privatefinal List<ObservedObject> observedObjects [Inherited From Monitor]
List of ObservedObjects to which the attribute to observe belongs.
protectedfinalstatic int RESET_FLAGS_ALREADY_NOTIFIED = "0" [Inherited From Monitor]
This flag is used to reset the alreadyNotifieds monitor attribute.
protectedfinalstatic int RUNTIME_ERROR_NOTIFIED = "8" [Inherited From Monitor]
  Flag denoting that a notification has occurred after changing the observed object or the observed attribute.
protected MBeanServer server [Inherited From Monitor]
  Reference to the MBean server.
pack-privatefinalstatic int THRESHOLD_ERROR_NOTIFIED = "16" [Inherited From Monitor]
  Flag denoting that a notification has occurred after changing the threshold.
Nested Classes
  CounterMonitor.CounterMonitorObservedObject
  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