Package com.tangosol.util.fsm
Interface StateEntryAction<S extends Enum<S>>
- Type Parameters:
S
- the type of the state
public interface StateEntryAction<S extends Enum<S>>
A
StateEntryAction
encapsulates the actions to be performed by
a FiniteStateMachine
when a particular state is entered.
A StateEntryAction
for a particular state will be executed
when the FiniteStateMachine
has been set (to the said state) or a
Transition
(to the said state) has successfully completed.
- Since:
- Coherence 12.2.1
- Author:
- Brian Oliver
-
Method Summary
Modifier and TypeMethodDescriptiononEnterState
(S exitingState, S enteringState, Event<S> event, ExecutionContext context) Performs the necessary actions when aFiniteStateMachine
enters a particular state.
-
Method Details
-
onEnterState
Performs the necessary actions when aFiniteStateMachine
enters a particular state. Once finished, the returnedInstruction
is performed.- Parameters:
exitingState
- the previous state of theFiniteStateMachine
prior to the state change (may benull
if there was no previous state)enteringState
- the new state of theFiniteStateMachine
event
- theEvent
that triggered the actioncontext
- theExecutionContext
for the action- Returns:
- the
Instruction
to be performed by theFiniteStateMachine
-