Class MonitorManager

java.lang.Object
ecmwf.common.monitor.MonitorManager
All Implemented Interfaces:
Serializable

public final class MonitorManager extends Object implements Serializable
The Class MonitorManager.
See Also:
  • Field Details

  • Constructor Details

    • MonitorManager

      public MonitorManager(String name, String service, int status, String comment) throws MonitorException
      Instantiates a new monitor manager.
      Parameters:
      name - the name
      service - the service
      status - the status
      comment - the comment
      Throws:
      MonitorException - the monitor exception
    • MonitorManager

      public MonitorManager(String name, int status, String comment) throws MonitorException
      Instantiates a new monitor manager. No default service, it must be provided during the subscription.
      Parameters:
      name - the name
      status - the status
      comment - the comment
      Throws:
      MonitorException - the monitor exception
  • Method Details

    • setProvider

      public static void setProvider(MonitorInterface provider)
      Sets the provider.
      Parameters:
      provider - the new provider
    • getProvider

      public static MonitorInterface getProvider()
      Gets the provider.
      Returns:
      the provider
    • getColor

      public static String getColor(int status) throws MonitorException
      Gets the color.
      Parameters:
      status - the status
      Returns:
      the color
      Throws:
      MonitorException - the monitor exception
    • update

      public void update(int status, String comment) throws MonitorException
      Update.
      Parameters:
      status - the status
      comment - the comment
      Throws:
      MonitorException - the monitor exception
    • update

      public void update(int status) throws MonitorException
      Update.
      Parameters:
      status - the status
      Throws:
      MonitorException - the monitor exception
    • update

      public void update(String comment) throws MonitorException
      Update.
      Parameters:
      comment - the comment
      Throws:
      MonitorException - the monitor exception
    • update

      public void update() throws MonitorException
      Update.
      Throws:
      MonitorException - the monitor exception
    • getComment

      public String getComment()
      Gets the comment.
      Returns:
      the comment
    • setComment

      public void setComment(String comment)
      Sets the comment.
      Parameters:
      comment - the new comment
    • getStatus

      public int getStatus()
      Gets the status.
      Returns:
      the status
    • getColor

      public String getColor()
      Gets the color.
      Returns:
      the color
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
    • setStatus

      public void setStatus(int status) throws MonitorException
      Sets the status.
      Parameters:
      status - the new status
      Throws:
      MonitorException - the monitor exception
    • getName

      public String getName()
      Gets the name.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name.
      Parameters:
      name - the new name
    • getService

      public String getService()
      Gets the service.
      Returns:
      the service
    • setService

      public void setService(String service)
      Sets the service.
      Parameters:
      service - the new service
    • isActivated

      public static boolean isActivated()
      Checks if is activated.
      Returns:
      true, if is activated
    • isDebug

      public static boolean isDebug()
      Checks if is debug.
      Returns:
      true, if is debug
    • setDebug

      public static void setDebug(boolean activated)
      Sets the debug.
      Parameters:
      activated - the new debug
    • getDelay

      public static long getDelay()
      Gets the delay.
      Returns:
      the delay
    • isGreen

      public boolean isGreen()
      Checks if is green.
      Returns:
      true, if is green
    • isRed

      public boolean isRed()
      Checks if is red.
      Returns:
      true, if is red
    • isYellow

      public boolean isYellow()
      Checks if is yellow.
      Returns:
      true, if is yellow