Class AbstractAlert<T>

java.lang.Object
eu.europa.esig.dss.alert.AbstractAlert<T>
Type Parameters:
T - the object to execute alert detection and handling on
All Implemented Interfaces:
Alert<T>
Direct Known Subclasses:
AbstractStatusAlert, DSSErrorHandlerAlert, LOTLAlert, SilentOnAlert, TLAlert

public abstract class AbstractAlert<T> extends Object implements Alert<T>
The class contains a general logic for alert handling
  • Constructor Details

    • AbstractAlert

      protected AbstractAlert()
      Empty constructor requiring implementation of #getAlertDetector and #getAlertHandler methods
    • AbstractAlert

      protected AbstractAlert(AlertDetector<T> detector, AlertHandler<T> handler)
      The default constructor setting the detector and handler explicitly
      Parameters:
      detector - AlertDetector to detect an event
      handler - AlertHandler to execute the corresponding code
  • Method Details

    • alert

      public void alert(T object)
      Description copied from interface: Alert
      Detect and execute the alert on the provided object
      Specified by:
      alert in interface Alert<T>
      Parameters:
      object - to detect and, if needed, execute the alert on
    • getAlertDetector

      protected AlertDetector<T> getAlertDetector()
      Gets the alert detector
      Returns:
      AlertDetector
    • getAlertHandler

      protected AlertHandler<T> getAlertHandler()
      Gets the alert handler
      Returns:
      AlertHandler