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
-
Monitor()
- Default constructor.
-
addMonitorListener(MonitorListener)
- Allows to register a listener for receiving monitor events.
-
deleteCmf()
- Delete the monitor.
-
getClassVersion()
- Returns the version of this class.
-
getDerivedGauge()
- Returns the derived gauge.
-
getDerivedGaugeTimestamp()
- Returns the derived gauge timestamp.
-
getGranularityPeriod()
-
Deprecated.
-
getGranularityPeriodAsLong()
- Returns the granularity period (in milliseconds).
-
getObservedObject()
- Returns the object being observed.
-
getObservedProperty()
- Returns the name of the property being observed.
-
handleAlarmClock(AlarmClockEvent)
- This handle will be called each time the alarm-clock has exceeded its timeout.
-
initCmf(Framework, ObjectName, boolean, ModificationList)
- Initialize the monitor.
-
isActive()
- Tests if the
Monitor is active.
-
performStart()
- Activates the
Monitor service.
-
performStop()
- Deactivates the
Monitor service.
-
removeMonitorListener(MonitorListener)
- Enables a listener for monitor events to be removed.
-
setGranularityPeriod(Integer)
-
Deprecated.
-
setGranularityPeriodAsLong(Long)
- Sets the granularity period (in milliseconds).
-
setObservedObject(ObjectName)
- Sets the object to observe.
-
setObservedProperty(String)
- Sets the property to observe.
Monitor
public Monitor()
- Default constructor.
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.
deleteCmf
public void deleteCmf()
- Delete the monitor.
handleAlarmClock
public void handleAlarmClock(AlarmClockEvent e)
- This handle will be called each time the alarm-clock has exceeded its timeout.
addMonitorListener
public void addMonitorListener(MonitorListener listener)
- Allows to register a listener for receiving monitor events.
removeMonitorListener
public void removeMonitorListener(MonitorListener listener)
- Enables a listener for monitor events to be removed.
getObservedObject
public ObjectName getObservedObject()
- Returns the object being observed.
setObservedObject
public void setObservedObject(ObjectName object)
- Sets the object to observe.
getObservedProperty
public String getObservedProperty()
- Returns the name of the property being observed.
setObservedProperty
public void setObservedProperty(String property)
- Sets the property to observe.
getGranularityPeriodAsLong
public Long getGranularityPeriodAsLong()
- Returns the granularity period (in milliseconds).
getGranularityPeriod
public Integer getGranularityPeriod()
- Note: getGranularityPeriod() is deprecated.
setGranularityPeriodAsLong
public void setGranularityPeriodAsLong(Long gp)
- Sets the granularity period (in milliseconds).
setGranularityPeriod
public void setGranularityPeriod(Integer gp)
- Note: setGranularityPeriod() is deprecated.
getDerivedGauge
public Number getDerivedGauge()
- Returns the derived gauge.
getDerivedGaugeTimestamp
public Date getDerivedGaugeTimestamp()
- Returns the derived gauge timestamp.
getClassVersion
public static String getClassVersion()
- Returns the version of this class.
performStart
public synchronized void performStart()
- Activates the
Monitor service.
performStop
public synchronized void performStop()
- Deactivates the
Monitor service.
isActive
public boolean isActive()
- Tests if the
Monitor is active.
All Packages Class Hierarchy This Package Previous Next Index