Class WindowMonitoringTimerTask

  • All Implemented Interfaces:
    MonitoringTimerTaskMBean, Runnable

    public class WindowMonitoringTimerTask
    extends MonitoringTimerTask
    The WindowMonitoringTimerTask class allows to periodically watch JMX attributes and send the corresponding values to the outpuStrean.
    • 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 java launching command, or in a3servers.xml configuration 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 is 60000L (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 java launching command, or in a3servers.xml configuration 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 is windowMonitoring.props.

        If the file does not exist the timer task is not launched.

        See Also:
        Constant Field Values
    • Constructor Detail

      • WindowMonitoringTimerTask

        public WindowMonitoringTimerTask​(Timer timer,
                                         long period,
                                         Properties attlist)
        Initializes the FileMonitoringTimerTask component.
        Parameters:
        timer - Timer to use to schedule the resulting task.
        period - Period value of the resulting task
        attlist - List of JMX attributes to periodically watch.
      • WindowMonitoringTimerTask

        public WindowMonitoringTimerTask()
        Instantiates the WindowMonitoringTimerTask component.
    • Method Detail

      • init

        public void init​(Timer timer,
                         long period,
                         Properties attlist,
                         Properties taskProps)
        Initializes the WindowMonitoringTimerTask component.
        Specified by:
        init in class MonitoringTimerTask
        Parameters:
        timer - The timer to use to schedule the resulting task.
        period - Period value of the resulting task
        attlist - 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:
        initializeRecords in class MonitoringTimerTask
      • addRecord

        protected void addRecord​(String mbean,
                                 String att,
                                 Object value)
        Records information about the specified attribute.
        Specified by:
        addRecord in class MonitoringTimerTask
        Parameters:
        mbean - The name of the related mbean.
        att - The name of the related attribute.
        value - The value of the related attribute.
      • 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.