Package com.tangosol.util.fsm
Class Instruction.TransitionTo<S extends Enum<S>>
- java.lang.Object
-
- com.tangosol.util.fsm.Instruction.TransitionTo<S>
-
- All Implemented Interfaces:
Event<S>
,Instruction
- Enclosing interface:
- Instruction
public static final class Instruction.TransitionTo<S extends Enum<S>> extends Object implements Instruction, Event<S>
AnInstruction
for aFiniteStateMachine
toInstruction.TransitionTo
another state. (immediately on the thread that created theInstruction
).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.util.fsm.Instruction
Instruction.ProcessEvent<S extends Enum<S>>, Instruction.TransitionTo<S extends Enum<S>>
-
-
Field Summary
-
Fields inherited from interface com.tangosol.util.fsm.Instruction
NOTHING, STOP
-
-
Constructor Summary
Constructors Constructor Description TransitionTo(S desiredState)
Constructs aInstruction.TransitionTo
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S
getDesiredState(S currentState, ExecutionContext context)
Determines the desired state of theFiniteStateMachine
for theEvent
given the current state of theFiniteStateMachine
.String
toString()
-
-
-
Constructor Detail
-
TransitionTo
public TransitionTo(S desiredState)
Constructs aInstruction.TransitionTo
.- Parameters:
desiredState
- the desired state to which to transition
-
-
Method Detail
-
getDesiredState
public S getDesiredState(S currentState, ExecutionContext context)
Determines the desired state of theFiniteStateMachine
for theEvent
given the current state of theFiniteStateMachine
.- Specified by:
getDesiredState
in interfaceEvent<S extends Enum<S>>
- Parameters:
currentState
- the current state of theFiniteStateMachine
context
- theExecutionContext
for theEvent
- Returns:
- the desired state of the
FiniteStateMachine
ornull
if no transition is required
-
-