Class AlertSampleManager.Threshold

java.lang.Object
org.ametys.runtime.plugins.admin.jvmstatus.monitoring.alerts.AlertSampleManager.Threshold
Enclosing interface:
AlertSampleManager

public static class AlertSampleManager.Threshold extends Object
Represents a threshold
  • Constructor Details

    • Threshold

      public Threshold(AlertSampleManager.Threshold.Operator operator, String datasourceName, Object value, I18nizableText mailSubject, I18nizableText mailBody)
      Creates a threshold.
      Parameters:
      operator - The kind of operator
      datasourceName - The id of the datasource
      value - The value of the threshold. Can be null to disable the alert.
      mailSubject - The subject of the potential mail to send.
      mailBody - The body of the potential mail to send.
  • Method Details

    • getDatasourceName

      Gets the datasource name of this threshold.
      Returns:
      the datasource name.
    • getValue

      public Object getValue()
      Gets the value of the threshold.
      Returns:
      the value of the threshold.
    • getMailSubject

      Gets the subject of the mail to send.
      Returns:
      the subject of the mail to send.
    • getMailBody

      Gets the body of the mail to send.
      Returns:
      the body of the mail to send.
    • isExceeded

      public boolean isExceeded(Object comparedTo)
      Tests if the given value exceeds the threshold.
      Parameters:
      comparedTo - The value to test against the threshold.
      Returns:
      true if it exceeded, false otherwise.