tigase.server.sreceiver.sysmon

## Class AbstractMonitor

- java.lang.Object
- - tigase.server.sreceiver.sysmon.AbstractMonitor

- All Implemented Interfaces:
    ResourceMonitorIfc
  Direct Known Subclasses:
    CPUMonitor, DiskMonitor, LogMonitor, MemMonitor, N270Monitor

      public abstract class AbstractMonitor
      extends Object
      implements ResourceMonitorIfc

  Created: Dec 10, 2008 8:37:28 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected float` | `treshold`
    `protected Set<Object>` | `warningsSent`

    - ### Fields inherited from interface tigase.server.sreceiver.sysmon.ResourceMonitorIfc

      `INTERVAL_10SECS, INTERVAL_1DAY, INTERVAL_1HOUR, INTERVAL_1MIN, MINUTE, SECOND`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMonitor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `check10Secs(Queue<Packet> results)`
    `void` | `check1Day(Queue<Packet> results)`
    `void` | `check1Hour(Queue<Packet> results)`
    `void` | `check1Min(Queue<Packet> results)`
    `String` | `commandsHelp()`
    `void` | `getStatistics(StatisticsList list)`
    `void` | `init(JID jid, float treshold, SystemMonitorTask smTask)`
    `boolean` | `isMonitorCommand(String command)`
    `void` | `prepareCalmDown(String text, Queue<Packet> results, Object warning)`
    `void` | `prepareWarning(String text, Queue<Packet> results, Object warning)`
    `void` | `resetWarnings()`
    `String` | `runCommand(String[] command)`
    `void` | `sendWarningOut(String text, Object warning)`
    `int` | `setValueInArr(double[] arr, int idx, double val)`
    `int` | `setValueInArr(float[] arr, int idx, float val)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface tigase.server.sreceiver.sysmon.ResourceMonitorIfc

      `destroy, getState`

- - ### Field Detail

    - #### warningsSent

          protected Set<Object> warningsSent

    - #### treshold

          protected float treshold

  - ### Constructor Detail

    - #### AbstractMonitor

          public AbstractMonitor()

  - ### Method Detail

    - #### init

          public void init(JID jid,
                           float treshold,
                           SystemMonitorTask smTask)

      Specified by:
        `init` in interface `ResourceMonitorIfc`

    - #### resetWarnings

          public void resetWarnings()

    - #### prepareWarning

          public void prepareWarning(String text,
                                     Queue<Packet> results,
                                     Object warning)

    - #### prepareCalmDown

          public void prepareCalmDown(String text,
                                      Queue<Packet> results,
                                      Object warning)

    - #### sendWarningOut

          public void sendWarningOut(String text,
                                     Object warning)

    - #### setValueInArr

          public int setValueInArr(float[] arr,
                                   int idx,
                                   float val)

    - #### setValueInArr

          public int setValueInArr(double[] arr,
                                   int idx,
                                   double val)

    - #### check10Secs

          public void check10Secs(Queue<Packet> results)

      Specified by:
        `check10Secs` in interface `ResourceMonitorIfc`

    - #### check1Day

          public void check1Day(Queue<Packet> results)

      Specified by:
        `check1Day` in interface `ResourceMonitorIfc`

    - #### check1Hour

          public void check1Hour(Queue<Packet> results)

      Specified by:
        `check1Hour` in interface `ResourceMonitorIfc`

    - #### check1Min

          public void check1Min(Queue<Packet> results)

      Specified by:
        `check1Min` in interface `ResourceMonitorIfc`

    - #### commandsHelp

          public String commandsHelp()

      Specified by:
        `commandsHelp` in interface `ResourceMonitorIfc`

    - #### runCommand

          public String runCommand(String[] command)

      Specified by:
        `runCommand` in interface `ResourceMonitorIfc`

    - #### isMonitorCommand

          public boolean isMonitorCommand(String command)

      Specified by:
        `isMonitorCommand` in interface `ResourceMonitorIfc`

    - #### getStatistics

          public void getStatistics(StatisticsList list)

      Specified by:
        `getStatistics` in interface `ResourceMonitorIfc`

Copyright © 2022 "Tigase, Inc.". All rights reserved.