All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.monitor.Monitor

java.lang.Object
   |
   +----com.sun.jaw.impl.agent.services.monitor.Monitor

public class Monitor
extends Object
implements AlarmClockListener, Serializable, ActivatableIf
This class provides a simple implementation of a monitor service.

The aim of this service is to observe the evolution in time of the value of a property of a given m-bean. The monitor service monitors values of a property in an observed m-bean. The observed property is monitored at intervals specified by the granularity period. A gauge value (derived gauge) is derived from the values of the observed property.

See Also:
CounterMonitor, GaugeMonitor

Constructor Index

 o Monitor()
Default constructor.

Method Index

 o addMonitorListener(MonitorListener)
Allows to register a listener for receiving monitor events.
 o deleteCmf()
Delete the monitor.
 o getClassVersion()
Returns the version of this class.
 o getDerivedGauge()
Returns the derived gauge.
 o getDerivedGaugeTimestamp()
Returns the derived gauge timestamp.
 o getGranularityPeriod()
Deprecated.
 o getGranularityPeriodAsLong()
Returns the granularity period (in milliseconds).
 o getObservedObject()
Returns the object being observed.
 o getObservedProperty()
Returns the name of the property being observed.
 o handleAlarmClock(AlarmClockEvent)
This handle will be called each time the alarm-clock has exceeded its timeout.
 o initCmf(Framework, ObjectName, boolean, ModificationList)
Initialize the monitor.
 o isActive()
Tests if the Monitor is active.
 o performStart()
Activates the Monitor service.
 o performStop()
Deactivates the Monitor service.
 o removeMonitorListener(MonitorListener)
Enables a listener for monitor events to be removed.
 o setGranularityPeriod(Integer)
Deprecated.
 o setGranularityPeriodAsLong(Long)
Sets the granularity period (in milliseconds).
 o setObservedObject(ObjectName)
Sets the object to observe.
 o setObservedProperty(String)
Sets the property to observe.

Constructors

 o Monitor
 public Monitor()
Default constructor.

Methods

 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
Initialize the monitor. The method will declare the object to the Core Management Framework.
For internal use only.

Parameters:
cmf - The core management framework to register the service with.
name - Object name containing configuration infotmation.
db - Indicates if persistent storage is required.
list - The modification list to use for setting up parameters.
Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
 o deleteCmf
 public void deleteCmf()
Delete the monitor.

 o handleAlarmClock
 public void handleAlarmClock(AlarmClockEvent e)
This handle will be called each time the alarm-clock has exceeded its timeout.

 o addMonitorListener
 public void addMonitorListener(MonitorListener listener)
Allows to register a listener for receiving monitor events.

 o removeMonitorListener
 public void removeMonitorListener(MonitorListener listener)
Enables a listener for monitor events to be removed.

 o getObservedObject
 public ObjectName getObservedObject()
Returns the object being observed.

 o setObservedObject
 public void setObservedObject(ObjectName object)
Sets the object to observe.

 o getObservedProperty
 public String getObservedProperty()
Returns the name of the property being observed.

 o setObservedProperty
 public void setObservedProperty(String property)
Sets the property to observe.

 o getGranularityPeriodAsLong
 public Long getGranularityPeriodAsLong()
Returns the granularity period (in milliseconds).

 o getGranularityPeriod
 public Integer getGranularityPeriod()
Note: getGranularityPeriod() is deprecated.

 o setGranularityPeriodAsLong
 public void setGranularityPeriodAsLong(Long gp)
Sets the granularity period (in milliseconds).

 o setGranularityPeriod
 public void setGranularityPeriod(Integer gp)
Note: setGranularityPeriod() is deprecated.

 o getDerivedGauge
 public Number getDerivedGauge()
Returns the derived gauge.

 o getDerivedGaugeTimestamp
 public Date getDerivedGaugeTimestamp()
Returns the derived gauge timestamp.

 o getClassVersion
 public static String getClassVersion()
Returns the version of this class.

 o performStart
 public synchronized void performStart()
Activates the Monitor service.

 o performStop
 public synchronized void performStop()
Deactivates the Monitor service.

 o isActive
 public boolean isActive()
Tests if the Monitor is active.


All Packages  Class Hierarchy  This Package  Previous  Next  Index