Package com.tangosol.util.fsm
Interface TransitionAction<S extends Enum<S>>
public interface TransitionAction<S extends Enum<S>>
A
TransitionAction
encapsulates the actions to be performed as part
of the Transition
from one state to another.- Since:
- Coherence 12.2.1
- Author:
- Brian Oliver
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onTransition
(String sName, S stateFrom, S stateTo, Event<S> event, ExecutionContext context) Performs the necessary actions as part of aTransition
from one state to another, triggered by a specifiedEvent
.
-
Method Details
-
onTransition
void onTransition(String sName, S stateFrom, S stateTo, Event<S> event, ExecutionContext context) throws RollbackTransitionException Performs the necessary actions as part of aTransition
from one state to another, triggered by a specifiedEvent
.Note: After executing this method the
FiniteStateMachine
will 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
- theEvent
that triggered theTransition
context
- theExecutionContext
for the action- Throws:
RollbackTransitionException
- if theTransition
should be aborted and theFiniteStateMachine
should be left in it's current state
-