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.- 
Method SummaryModifier and TypeMethodDescriptionvoidaddTriggerListener(TriggerListener listener) Adds the trigger listener.voidarm()Arm a trigger.voiddisarm()Disarm a trigger.reactor.core.publisher.Mono<Boolean>evaluate(TriggerContext<S, E> context) Evaluate trigger.getEvent()Gets the event associated with this trigger.
- 
Method Details- 
evaluateEvaluate trigger.- Parameters:
- context- the context
- Returns:
- Mono for completion with true, if trigger is fired, false otherwise
 
- 
addTriggerListenerAdds the trigger listener.- Parameters:
- listener- the listener
 
- 
getEventE getEvent()Gets the event associated with this trigger. It is possible that there are no event association.- Returns:
- the event
 
- 
armvoid arm()Arm a trigger. After trigger has been armed aTriggerListenermay receive events.
- 
disarmvoid disarm()Disarm a trigger. After trigger has been disarmed aTriggerListenerwill not receive events.
 
-