|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jaw.impl.agent.services.monitor.Monitor
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.
CounterMonitor
,
GaugeMonitor
, Serialized FormField Summary | |
protected java.lang.Boolean |
administrativeStateOnOff
State of the monitor. |
protected AlarmClock |
alarmClock
Alarm-clock service. |
protected int |
already_notified
Selected monitor errors that have already been notified |
protected static int |
ALREADY_NOTIFIED_FLAGS_CLEARED
Flags defining possible monitor errors |
protected Framework |
cmf
Reference on the Core Management Framework. |
protected java.lang.Number |
derivedGauge
Derived gauge. |
protected java.util.Date |
derivedGaugeTimestamp
Derived gauge timestamp. |
protected int |
event_type
Type of monitor event |
protected static int |
GRANULARITY_PERIOD_ALREADY_NOTIFIED
|
protected java.lang.Long |
granularityPeriod
Granularity period. |
protected java.util.Vector |
listeners
List of listeners for alarm-clock service. |
protected static int |
OBSERVED_OBJECT_ALREADY_NOTIFIED
|
protected static int |
OBSERVED_PROPERTY_ALREADY_NOTIFIED
|
protected static int |
OBSERVED_PROPERTY_TYPE_ALREADY_NOTIFIED
|
protected ObjectName |
observedObject
Object to which the property to observe belongs to. |
protected java.lang.String |
observedProperty
Name of the property to observe. |
Constructor Summary | |
Monitor()
Default constructor. |
Method Summary | |
void |
addMonitorListener(MonitorListener listener)
Allows to register a listener for receiving monitor events. |
void |
deleteCmf()
Delete the monitor. |
static java.lang.String |
getClassVersion()
Returns the version of this class. |
java.lang.Number |
getDerivedGauge()
Returns the derived gauge. |
java.util.Date |
getDerivedGaugeTimestamp()
Returns the derived gauge timestamp. |
java.lang.Integer |
getGranularityPeriod()
Deprecated. |
java.lang.Long |
getGranularityPeriodAsLong()
Returns the granularity period (in milliseconds). |
ObjectName |
getObservedObject()
Returns the object being observed. |
java.lang.String |
getObservedProperty()
Returns the name of the property being observed. |
void |
handleAlarmClock(AlarmClockEvent e)
This handle will be called each time the alarm-clock has exceeded its timeout. |
void |
initCmf(Framework cmf,
ObjectName name,
boolean db,
ModificationList list)
Initialize the monitor. |
boolean |
isActive()
Tests if the Monitor is active. |
protected void |
notifyMonitor(java.lang.Integer eType,
java.lang.String eMsg,
java.lang.Object eObsObj,
java.lang.String eObsProp,
java.lang.Number eDerGauge)
This method is used by the monitor service to send a monitor event to all the listeners registered for this kind of event. |
void |
performStart()
Activates the Monitor service. |
void |
performStop()
Deactivates the Monitor service. |
void |
removeMonitorListener(MonitorListener listener)
Enables a listener for monitor events to be removed. |
void |
setGranularityPeriod(java.lang.Integer gp)
Deprecated. |
void |
setGranularityPeriodAsLong(java.lang.Long gp)
Sets the granularity period (in milliseconds). |
void |
setObservedObject(ObjectName object)
Sets the object to observe. |
void |
setObservedProperty(java.lang.String property)
Sets the property to observe. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected ObjectName observedObject
protected java.lang.String observedProperty
protected java.lang.Long granularityPeriod
protected transient java.lang.Number derivedGauge
protected transient java.util.Date derivedGaugeTimestamp
protected transient java.lang.Boolean administrativeStateOnOff
protected AlarmClock alarmClock
protected transient java.util.Vector listeners
protected Framework cmf
protected int already_notified
protected static final int ALREADY_NOTIFIED_FLAGS_CLEARED
protected static final int GRANULARITY_PERIOD_ALREADY_NOTIFIED
protected static final int OBSERVED_OBJECT_ALREADY_NOTIFIED
protected static final int OBSERVED_PROPERTY_ALREADY_NOTIFIED
protected static final int OBSERVED_PROPERTY_TYPE_ALREADY_NOTIFIED
protected int event_type
Constructor Detail |
public Monitor()
Method Detail |
public void initCmf(Framework cmf, ObjectName name, boolean db, ModificationList list) throws InstanceAlreadyExistException
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.public void deleteCmf()
public void handleAlarmClock(AlarmClockEvent e)
public void addMonitorListener(MonitorListener listener)
public void removeMonitorListener(MonitorListener listener)
public ObjectName getObservedObject()
public void setObservedObject(ObjectName object)
public java.lang.String getObservedProperty()
public void setObservedProperty(java.lang.String property)
public java.lang.Long getGranularityPeriodAsLong()
public java.lang.Integer getGranularityPeriod()
public void setGranularityPeriodAsLong(java.lang.Long gp)
public void setGranularityPeriod(java.lang.Integer gp)
public java.lang.Number getDerivedGauge()
public java.util.Date getDerivedGaugeTimestamp()
public static java.lang.String getClassVersion()
public void performStart()
Monitor
service.public void performStop()
Monitor
service.public boolean isActive()
Monitor
is active.protected void notifyMonitor(java.lang.Integer eType, java.lang.String eMsg, java.lang.Object eObsObj, java.lang.String eObsProp, java.lang.Number eDerGauge)
eType
- one of the event types defined by MonitorEvent.eMsg
- message for event.eObsObj
- the observed object this monitor is observing.eObsProp
- the observed property this monitor is observing.eDerGauge
- the value of the derived gauge for the given object and property.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |