public class StateMachineBuilderImpl<T extends StateMachine<T,S,E,C>,S,E,C> extends Object implements StateMachineBuilder<T,S,E,C>
| Modifier and Type | Field and Description |
|---|---|
protected Converter<E> |
eventConverter |
protected Converter<S> |
stateConverter |
| Modifier and Type | Method and Description |
|---|---|
MutableState<T,S,E,C> |
defineFinalState(S stateId)
Define a final state in state machine model
|
void |
defineFinishEvent(E finishEvent)
Define event for parallel transition finished
|
MutableState<T,S,E,C> |
defineLinkedState(S stateId,
StateMachineBuilder<? extends StateMachine<?,S,E,C>,S,E,C> linkedStateMachineBuilder,
S initialLinkedState,
Object... extraParams)
Define a linked state
|
void |
defineNoInitSequentialStatesOn(S parentStateId,
HistoryType historyType,
S... childStateIds)
Define sequential child states on parent state without initial state
|
void |
defineNoInitSequentialStatesOn(S parentStateId,
S... childStateIds)
Define sequential child states on parent state without initial state
|
void |
defineParallelStatesOn(S parentStateId,
S... childStateIds)
Define sequential child states on parent state.
|
void |
defineSequentialStatesOn(S parentStateId,
HistoryType historyType,
S... childStateIds)
Define sequential child states on parent state
|
void |
defineSequentialStatesOn(S parentStateId,
S... childStateIds)
Define sequential child states whose hierarchy type is default set to NONE on parent state
|
void |
defineStartEvent(E startEvent)
Define event for state machine started
|
MutableState<T,S,E,C> |
defineState(S stateId)
Define a new state in state machine model
|
void |
defineTerminateEvent(E terminateEvent)
Define event for state machine terminated
|
MutableState<T,S,E,C> |
defineTimedState(S stateId,
long initialDelay,
long timeInterval,
E autoEvent,
C autoContext)
Define a timed state
|
ExternalTransitionBuilder<T,S,E,C> |
externalTransition()
Start to build external transition
|
ExternalTransitionBuilder<T,S,E,C> |
externalTransition(int priority)
Create external transition builder with priority
|
MultiTransitionBuilder<T,S,E,C> |
externalTransitions()
Create multiple external transitions builder with default priority
|
MultiTransitionBuilder<T,S,E,C> |
externalTransitions(int priority)
Create multiple external transitions builder with priority
|
InternalTransitionBuilder<T,S,E,C> |
internalTransition()
Start to build internal transition
|
InternalTransitionBuilder<T,S,E,C> |
internalTransition(int priority)
Create internal transition builder with priority
|
LocalTransitionBuilder<T,S,E,C> |
localTransition()
Start to build local transition
|
LocalTransitionBuilder<T,S,E,C> |
localTransition(int priority)
Create local transition builder with priority
|
MultiTransitionBuilder<T,S,E,C> |
localTransitions()
Create multiple local transitions builder with default priority
|
MultiTransitionBuilder<T,S,E,C> |
localTransitions(int priority)
Create multiple local transitions builder with priority
|
T |
newStateMachine(S initialStateId)
Create a new state machine instance
|
T |
newStateMachine(S initialStateId,
Object... extraParams)
Create new state machine instance according to state machine definition
|
T |
newStateMachine(S initialStateId,
StateMachineConfiguration configuration,
Object... extraParams)
Create new state machine instance according to state machine definition
|
EntryExitActionBuilder<T,S,E,C> |
onEntry(S stateId)
Define on entry actions for state
|
EntryExitActionBuilder<T,S,E,C> |
onExit(S stateId)
Define on exit actions for state
|
void |
setStateMachineConfiguration(StateMachineConfiguration configure)
Set default state machine configuration for state machine instance created by this builder
|
DeferBoundActionBuilder<T,S,E,C> |
transit()
Create defer bound action builder
|
ExternalTransitionBuilder<T,S,E,C> |
transition()
Start to build external transition, same as externalTransition
|
ExternalTransitionBuilder<T,S,E,C> |
transition(int priority)
Same as externalTransition
|
MultiTransitionBuilder<T,S,E,C> |
transitions()
The same as
externalTransitions |
MultiTransitionBuilder<T,S,E,C> |
transitions(int priority)
the same as
externalTransitions |
public ExternalTransitionBuilder<T,S,E,C> externalTransition()
StateMachineBuilderexternalTransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public MultiTransitionBuilder<T,S,E,C> externalTransitions()
StateMachineBuilderexternalTransitions in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public ExternalTransitionBuilder<T,S,E,C> transition()
StateMachineBuildertransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public MultiTransitionBuilder<T,S,E,C> transitions()
StateMachineBuilderexternalTransitionstransitions in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public DeferBoundActionBuilder<T,S,E,C> transit()
StateMachineBuilderpublic LocalTransitionBuilder<T,S,E,C> localTransition()
StateMachineBuilderlocalTransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public MultiTransitionBuilder<T,S,E,C> localTransitions()
StateMachineBuilderlocalTransitions in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public InternalTransitionBuilder<T,S,E,C> internalTransition()
StateMachineBuilderinternalTransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public ExternalTransitionBuilder<T,S,E,C> externalTransition(int priority)
StateMachineBuilderexternalTransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - external transition prioritypublic MultiTransitionBuilder<T,S,E,C> externalTransitions(int priority)
StateMachineBuilderexternalTransitions in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - external transitions prioritypublic ExternalTransitionBuilder<T,S,E,C> transition(int priority)
StateMachineBuildertransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - transition prioritypublic MultiTransitionBuilder<T,S,E,C> transitions(int priority)
StateMachineBuilderexternalTransitionstransitions in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - external transitions prioritypublic LocalTransitionBuilder<T,S,E,C> localTransition(int priority)
StateMachineBuilderlocalTransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - local transition prioritypublic MultiTransitionBuilder<T,S,E,C> localTransitions(int priority)
StateMachineBuilderlocalTransitions in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - local transition prioritypublic InternalTransitionBuilder<T,S,E,C> internalTransition(int priority)
StateMachineBuilderinternalTransition in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>priority - internal transition prioritypublic T newStateMachine(S initialStateId)
StateMachineBuildernewStateMachine in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>initialStateId - initial state idpublic T newStateMachine(S initialStateId, Object... extraParams)
StateMachineBuildernewStateMachine in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>initialStateId - the id of state machine initial stateextraParams - other parameters for instantiate state machinepublic T newStateMachine(S initialStateId, StateMachineConfiguration configuration, Object... extraParams)
StateMachineBuildernewStateMachine in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>initialStateId - the id of state machine initial stateconfiguration - configuration for state machineextraParams - other parameters for instantiate state machinepublic MutableState<T,S,E,C> defineState(S stateId)
StateMachineBuilderdefineState in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>stateId - id of new statepublic MutableState<T,S,E,C> defineFinalState(S stateId)
StateMachineBuilderdefineFinalState in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>stateId - id of final statepublic MutableState<T,S,E,C> defineLinkedState(S stateId, StateMachineBuilder<? extends StateMachine<?,S,E,C>,S,E,C> linkedStateMachineBuilder, S initialLinkedState, Object... extraParams)
StateMachineBuilderdefineLinkedState in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>stateId - id of linked statelinkedStateMachineBuilder - linked state machine builderinitialLinkedState - initial linked stateextraParams - additional parameters used to create linked state machinepublic MutableState<T,S,E,C> defineTimedState(S stateId, long initialDelay, long timeInterval, E autoEvent, C autoContext)
StateMachineBuilderdefineTimedState in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>stateId - state idinitialDelay - initial delay mstimeInterval - time period if null not repeatpublic void defineSequentialStatesOn(S parentStateId, S... childStateIds)
StateMachineBuilderdefineSequentialStatesOn in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>parentStateId - id of parent statechildStateIds - child states id of parent state. The first child state will be used as initial child state of parent state.public void defineNoInitSequentialStatesOn(S parentStateId, S... childStateIds)
StateMachineBuilderdefineNoInitSequentialStatesOn in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>parentStateId - id of parent statechildStateIds - child states id of parent statepublic void defineNoInitSequentialStatesOn(S parentStateId, HistoryType historyType, S... childStateIds)
StateMachineBuilderdefineNoInitSequentialStatesOn in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>parentStateId - id of parent statehistoryType - history type of parent statechildStateIds - child states id of parent statepublic void defineSequentialStatesOn(S parentStateId, HistoryType historyType, S... childStateIds)
StateMachineBuilderdefineSequentialStatesOn in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>parentStateId - id of parent statehistoryType - history type of parent statechildStateIds - child states id of parent state. The first child state will be used as initial child state of parent state.public void defineParallelStatesOn(S parentStateId, S... childStateIds)
StateMachineBuilderdefineParallelStatesOn in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>parentStateId - id of parent statechildStateIds - child states id of parent state. The first child state will be used as initial child state of parent state.public EntryExitActionBuilder<T,S,E,C> onEntry(S stateId)
StateMachineBuilderpublic EntryExitActionBuilder<T,S,E,C> onExit(S stateId)
StateMachineBuilderpublic void defineFinishEvent(E finishEvent)
StateMachineBuilderdefineFinishEvent in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public void defineStartEvent(E startEvent)
StateMachineBuilderdefineStartEvent in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public void defineTerminateEvent(E terminateEvent)
StateMachineBuilderdefineTerminateEvent in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>public void setStateMachineConfiguration(StateMachineConfiguration configure)
StateMachineBuildersetStateMachineConfiguration in interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>configure - state machine default configurationCopyright © 2013–2016. All rights reserved.