Interface Trigger<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Known Implementing Classes:
EventTrigger, TimerTrigger

public interface Trigger<S,E>
Trigger is the cause of the Transition. Cause is usually an event but can be some other signal or a change in some condition.
Author:
Janne Valkealahti
  • Method Details

    • evaluate

      reactor.core.publisher.Mono<Boolean> evaluate(TriggerContext<S,E> context)
      Evaluate trigger.
      Parameters:
      context - the context
      Returns:
      Mono for completion with true, if trigger is fired, false otherwise
    • addTriggerListener

      void addTriggerListener(TriggerListener listener)
      Adds the trigger listener.
      Parameters:
      listener - the listener
    • getEvent

      E getEvent()
      Gets the event associated with this trigger. It is possible that there are no event association.
      Returns:
      the event
    • arm

      void arm()
      Arm a trigger. After trigger has been armed a TriggerListener may receive events.
    • disarm

      void disarm()
      Disarm a trigger. After trigger has been disarmed a TriggerListener will not receive events.