|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
fr.dyade.aaa.common.monitoring.MonitoringTimerTask
public abstract class MonitoringTimerTask
The MonitoringTimerTask
class allows to periodically watch JMX attributes
and store the corresponding values to various support.
Field Summary | |
---|---|
static org.objectweb.util.monolog.api.Logger |
logger
|
protected long |
period
Time between two monitoring events |
Constructor Summary | |
---|---|
MonitoringTimerTask(long period,
java.util.Properties attlist)
Initializes the MonitoringTimerTask component. |
Method Summary | |
---|---|
void |
addMonitoredAttributes(java.lang.String MBeanName,
java.lang.String attributes)
Add the specified attributes to the list of monitored attributes. |
protected abstract void |
addRecord(javax.management.ObjectName mbean,
java.lang.String att,
java.lang.Object value)
Records information about the specified attribute. |
void |
cancelTask()
Cancels this timer task. |
void |
delMonitoredAttributes(java.lang.String MBeanName)
Removes all the attributes of the specified MBean in the list of monitored attributes. |
protected abstract void |
finalizeRecords()
Finalize the record for the current time. |
java.lang.String[] |
getMonitoredAttributes()
Returns the comma separated list of all monitored attributes. |
long |
getPeriod()
Returns the period value of this task, -1 if not set. |
protected abstract void |
initializeRecords()
Initialize the record for the current collect time. |
void |
run()
When the task is waken up, collect the monitoring information required and saves it. |
protected void |
start(java.util.Timer timer)
Starts the resulting task. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long period
public static org.objectweb.util.monolog.api.Logger logger
Constructor Detail |
---|
public MonitoringTimerTask(long period, java.util.Properties attlist)
MonitoringTimerTask
component.
period
- Period value of the resulting taskattlist
- List of JMX attributes to periodically watch.Method Detail |
---|
public long getPeriod()
getPeriod
in interface MonitoringTimerTaskMBean
protected final void start(java.util.Timer timer)
timer
- Timer to use to schedule the resulting task.protected abstract void initializeRecords()
protected abstract void addRecord(javax.management.ObjectName mbean, java.lang.String att, java.lang.Object value)
mbean
- The name of the related mbean.att
- The name of the related attribute.value
- The value of the related attribute.protected abstract void finalizeRecords()
public void run()
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
fr.dyade.aaa.common.TimerTask#run()
public java.lang.String[] getMonitoredAttributes()
getMonitoredAttributes
in interface MonitoringTimerTaskMBean
public void addMonitoredAttributes(java.lang.String MBeanName, java.lang.String attributes)
addMonitoredAttributes
in interface MonitoringTimerTaskMBean
MBeanName
- the name of the MBean.attributes
- the comma separated list of attributes to monitor.public void delMonitoredAttributes(java.lang.String MBeanName)
delMonitoredAttributes
in interface MonitoringTimerTaskMBean
MBeanName
- the name of the MBean.public void cancelTask()
cancelTask
in interface MonitoringTimerTaskMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |