Package fr.dyade.aaa.common.monitoring
Class WindowMonitoringTimerTask
- java.lang.Object
-
- java.util.TimerTask
-
- fr.dyade.aaa.common.monitoring.MonitoringTimerTask
-
- fr.dyade.aaa.common.monitoring.WindowMonitoringTimerTask
-
- All Implemented Interfaces:
MonitoringTimerTaskMBean,Runnable
public class WindowMonitoringTimerTask extends MonitoringTimerTask
TheWindowMonitoringTimerTaskclass allows to periodically watch JMX attributes and send the corresponding values to the outpuStrean.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) JTextFieldaddMbeanField(package private) JTextFieldattFieldstatic StringDEFAULT_MONITORING_CONFIG_PATHDefault value for the pathname of a configuration file for the monitoring task in the server, value iswindowMonitoring.props.static longDEFAULT_MONITORING_CONFIG_PERIODDefault value for the scanning period for the monitoring task in the server, value is60000L(60 seconds).(package private) JTextFielddelMbeanField(package private) Graphicsgraphstatic StringMONITORING_CONFIG_PATH_PROPERTYName of property allowing to fix the pathname of a configuration file for the monitoring task in the server.static StringMONITORING_CONFIG_PERIOD_PROPERTYName of property allowing to fix the scanning period for the monitoring task in the server.(package private) StringBufferstrbuf(package private) JTextAreatextArea-
Fields inherited from class fr.dyade.aaa.common.monitoring.MonitoringTimerTask
attlist, logger, mbeanName, timerPeriod
-
-
Constructor Summary
Constructors Constructor Description WindowMonitoringTimerTask()Instantiates theWindowMonitoringTimerTaskcomponent.WindowMonitoringTimerTask(Timer timer, long period, Properties attlist)Initializes theFileMonitoringTimerTaskcomponent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRecord(String mbean, String att, Object value)Records information about the specified attribute.protected voidfinalizeRecords()Finalize the record for the current time.protected voidGUI(String title, int x, int y)Create window for print monitoring results.voidinit(Timer timer, long period, Properties attlist, Properties taskProps)Initializes theWindowMonitoringTimerTaskcomponent.protected voidinitializeRecords()Initialize the record for the current collect time.-
Methods inherited from class fr.dyade.aaa.common.monitoring.MonitoringTimerTask
addMonitoredAttributes, cancelTask, delMonitoredAttributes, getMonitoredAttributes, getPeriod, run, start
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Field Detail
-
MONITORING_CONFIG_PERIOD_PROPERTY
public static final String MONITORING_CONFIG_PERIOD_PROPERTY
Name of property allowing to fix the scanning period for the monitoring task in the server.This property can be fixed either from
javalaunching command, or ina3servers.xmlconfiguration file.- See Also:
- Constant Field Values
-
DEFAULT_MONITORING_CONFIG_PERIOD
public static final long DEFAULT_MONITORING_CONFIG_PERIOD
Default value for the scanning period for the monitoring task in the server, value is60000L(60 seconds).- See Also:
- Constant Field Values
-
MONITORING_CONFIG_PATH_PROPERTY
public static final String MONITORING_CONFIG_PATH_PROPERTY
Name of property allowing to fix the pathname of a configuration file for the monitoring task in the server.This property can be fixed either from
javalaunching command, or ina3servers.xmlconfiguration file.- See Also:
- Constant Field Values
-
DEFAULT_MONITORING_CONFIG_PATH
public static final String DEFAULT_MONITORING_CONFIG_PATH
Default value for the pathname of a configuration file for the monitoring task in the server, value iswindowMonitoring.props.If the file does not exist the timer task is not launched.
- See Also:
- Constant Field Values
-
strbuf
StringBuffer strbuf
-
textArea
JTextArea textArea
-
attField
JTextField attField
-
addMbeanField
JTextField addMbeanField
-
delMbeanField
JTextField delMbeanField
-
graph
Graphics graph
-
-
Constructor Detail
-
WindowMonitoringTimerTask
public WindowMonitoringTimerTask(Timer timer, long period, Properties attlist)
Initializes theFileMonitoringTimerTaskcomponent.- Parameters:
timer- Timer to use to schedule the resulting task.period- Period value of the resulting taskattlist- List of JMX attributes to periodically watch.
-
WindowMonitoringTimerTask
public WindowMonitoringTimerTask()
Instantiates theWindowMonitoringTimerTaskcomponent.
-
-
Method Detail
-
init
public void init(Timer timer, long period, Properties attlist, Properties taskProps)
Initializes theWindowMonitoringTimerTaskcomponent.- Specified by:
initin classMonitoringTimerTask- Parameters:
timer- The timer to use to schedule the resulting task.period- Period value of the resulting taskattlist- List of JMX attributes to periodically watch.taskProps- The properties to initialize the task.
-
initializeRecords
protected void initializeRecords()
Initialize the record for the current collect time. For the FileMonitoringTimer, it consists to initialize a StringBuffer to collect informations about all attributes.- Specified by:
initializeRecordsin classMonitoringTimerTask
-
addRecord
protected void addRecord(String mbean, String att, Object value)
Records information about the specified attribute.- Specified by:
addRecordin classMonitoringTimerTask- Parameters:
mbean- The name of the related mbean.att- The name of the related attribute.value- The value of the related attribute.
-
finalizeRecords
protected void finalizeRecords()
Finalize the record for the current time.- Specified by:
finalizeRecordsin classMonitoringTimerTask
-
GUI
protected void GUI(String title, int x, int y)
Create window for print monitoring results.- Parameters:
title- Title of the windows.x- horizontal position of the window.y- vertical position of the window.
-
-