T - type of State MachineS - type of StateE - type of EventC - type of Contextpublic interface ImmutableTransition<T extends StateMachine<T,S,E,C>,S,E,C> extends Visitable, SquirrelComponent
Transition A directed relationship between two states which represents the complete response of a state machine to an occurrence of an event of a particular type.
Condition A constraint which must evaluate to true after the trigger occurs in order for the transition to complete.
Transition Action An activity which is executed when performing a certain transition.
Trigger(Event) A triggering activity that causes a transition to occur.
| Modifier and Type | Method and Description |
|---|---|
List<Action<T,S,E,C>> |
getActions() |
Condition<C> |
getCondition() |
E |
getEvent() |
int |
getPriority() |
ImmutableState<T,S,E,C> |
getSourceState() |
ImmutableState<T,S,E,C> |
getTargetState() |
TransitionType |
getType() |
void |
internalFire(StateContext<T,S,E,C> stateContext)
Notify transition when receiving event
|
boolean |
isMatch(S fromState,
S toState,
E event,
int priority) |
boolean |
isMatch(S fromState,
S toState,
E event,
int priority,
Class<?> condClazz,
TransitionType type) |
ImmutableState<T,S,E,C> |
transit(StateContext<T,S,E,C> stateContext)
Execute transition under state context
|
void |
verify()
Verify transition correctness
|
ImmutableState<T,S,E,C> getSourceState()
ImmutableState<T,S,E,C> getTargetState()
ImmutableState<T,S,E,C> transit(StateContext<T,S,E,C> stateContext)
stateContext - E getEvent()
TransitionType getType()
int getPriority()
boolean isMatch(S fromState, S toState, E event, int priority, Class<?> condClazz, TransitionType type)
void internalFire(StateContext<T,S,E,C> stateContext)
stateContext - void verify()
Copyright © 2013–2016. All rights reserved.