Interface AlarmActionHandler

All Superinterfaces:
Serializable
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AlarmActionHandler extends Serializable
Interface for handling alarm-triggered actions.

This interface allows automatic responses to alarm events, such as:

  • Control adjustments (valve throttling, flow reduction)
  • Safety logic activation (ESD, HIPPS)
  • Operator notifications
  • Logging and reporting
Version:
1.0
Author:
ESOL
  • Method Details

    • handle

      boolean handle(AlarmEvent event)
      Handles an alarm event and performs the configured action.
      Parameters:
      event - the alarm event that triggered this handler
      Returns:
      true if action was taken, false otherwise
    • getPriority

      default int getPriority()
      Returns the priority of this handler (higher values execute first).
      Returns:
      handler priority
    • getActionDescription

      default String getActionDescription()
      Returns a description of the action this handler performs.
      Returns:
      action description
    • activateLogic

      static AlarmActionHandler activateLogic(String sourceName, AlarmLevel level, AlarmEventType eventType, ProcessLogic logic)
      Creates a handler that activates process logic when alarm conditions are met.
      Parameters:
      sourceName - the alarm source name to match (e.g., "PT-101")
      level - the alarm level to match (HIHI, HI, LO, LOLO)
      eventType - the event type to match (ACTIVATED, CLEARED, ACKNOWLEDGED)
      logic - the process logic to activate
      Returns:
      alarm action handler
    • activateLogicOnHIHI

      static AlarmActionHandler activateLogicOnHIHI(String sourceName, ProcessLogic logic)
      Creates a handler that activates process logic when HIHI alarm is activated.
      Parameters:
      sourceName - the alarm source name to match
      logic - the process logic to activate
      Returns:
      alarm action handler
    • activateLogicOnLOLO

      static AlarmActionHandler activateLogicOnLOLO(String sourceName, ProcessLogic logic)
      Creates a handler that activates process logic when LOLO alarm is activated.
      Parameters:
      sourceName - the alarm source name to match
      logic - the process logic to activate
      Returns:
      alarm action handler
    • composite

      static AlarmActionHandler composite(List<AlarmActionHandler> handlers)
      Creates a composite handler that executes multiple handlers in sequence.
      Parameters:
      handlers - list of handlers to execute
      Returns:
      composite alarm action handler