Package com.tangosol.util.fsm
Interface TransitionAction<S extends Enum<S>>
-
public interface TransitionAction<S extends Enum<S>>ATransitionActionencapsulates the actions to be performed as part of theTransitionfrom one state to another.- Since:
- Coherence 12.2.1
- Author:
- Brian Oliver
- See Also:
Transition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonTransition(String sName, S stateFrom, S stateTo, Event<S> event, ExecutionContext context)Performs the necessary actions as part of aTransitionfrom one state to another, triggered by a specifiedEvent.
-
-
-
Method Detail
-
onTransition
void onTransition(String sName, S stateFrom, S stateTo, Event<S> event, ExecutionContext context) throws RollbackTransitionException
Performs the necessary actions as part of aTransitionfrom one state to another, triggered by a specifiedEvent.Note: After executing this method the
FiniteStateMachinewill automatically move to the state specified by theTransition.- Parameters:
sName- the name of the transitionstateFrom- the state from which the transition is occurringstateTo- the state to which the transition is occurringevent- theEventthat triggered theTransitioncontext- theExecutionContextfor the action- Throws:
RollbackTransitionException- if theTransitionshould be aborted and theFiniteStateMachineshould be left in it's current state
-
-