T - The type of implemented state machineS - The type of implemented stateE - The type of implemented eventC - The type of implemented contextpublic interface StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C>
| 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 |
ExternalTransitionBuilder<T,S,E,C> externalTransition()
MultiTransitionBuilder<T,S,E,C> externalTransitions()
ExternalTransitionBuilder<T,S,E,C> transition()
MultiTransitionBuilder<T,S,E,C> transitions()
externalTransitionsDeferBoundActionBuilder<T,S,E,C> transit()
LocalTransitionBuilder<T,S,E,C> localTransition()
MultiTransitionBuilder<T,S,E,C> localTransitions()
InternalTransitionBuilder<T,S,E,C> internalTransition()
ExternalTransitionBuilder<T,S,E,C> externalTransition(int priority)
priority - external transition priorityMultiTransitionBuilder<T,S,E,C> externalTransitions(int priority)
priority - external transitions priorityExternalTransitionBuilder<T,S,E,C> transition(int priority)
priority - transition priorityMultiTransitionBuilder<T,S,E,C> transitions(int priority)
externalTransitionspriority - external transitions priorityLocalTransitionBuilder<T,S,E,C> localTransition(int priority)
priority - local transition priorityMultiTransitionBuilder<T,S,E,C> localTransitions(int priority)
priority - local transition priorityInternalTransitionBuilder<T,S,E,C> internalTransition(int priority)
priority - internal transition priorityMutableState<T,S,E,C> defineState(S stateId)
stateId - id of new stateMutableState<T,S,E,C> defineFinalState(S stateId)
stateId - id of final stateMutableState<T,S,E,C> defineLinkedState(S stateId, StateMachineBuilder<? extends StateMachine<?,S,E,C>,S,E,C> linkedStateMachineBuilder, S initialLinkedState, Object... extraParams)
stateId - id of linked statelinkedStateMachineBuilder - linked state machine builderinitialLinkedState - initial linked stateextraParams - additional parameters used to create linked state machineMutableState<T,S,E,C> defineTimedState(S stateId, long initialDelay, long timeInterval, E autoEvent, C autoContext)
stateId - state idinitialDelay - initial delay mstimeInterval - time period if null not repeatautoEvent - autoContext - void defineSequentialStatesOn(S parentStateId, S... childStateIds)
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.void defineSequentialStatesOn(S parentStateId, HistoryType historyType, S... childStateIds)
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.void defineNoInitSequentialStatesOn(S parentStateId, S... childStateIds)
parentStateId - id of parent statechildStateIds - child states id of parent statevoid defineNoInitSequentialStatesOn(S parentStateId, HistoryType historyType, S... childStateIds)
parentStateId - id of parent statehistoryType - history type of parent statechildStateIds - child states id of parent statevoid defineParallelStatesOn(S parentStateId, S... childStateIds)
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.void defineFinishEvent(E finishEvent)
finishEvent - void defineStartEvent(E startEvent)
startEvent - void defineTerminateEvent(E terminateEvent)
terminateEvent - EntryExitActionBuilder<T,S,E,C> onEntry(S stateId)
stateId - the id of stateEntryExitActionBuilder<T,S,E,C> onExit(S stateId)
stateId - the id of stateT newStateMachine(S initialStateId)
initialStateId - initial state idT newStateMachine(S initialStateId, Object... extraParams)
initialStateId - the id of state machine initial stateextraParams - other parameters for instantiate state machineT newStateMachine(S initialStateId, StateMachineConfiguration configuration, Object... extraParams)
initialStateId - the id of state machine initial stateconfiguration - configuration for state machineextraParams - other parameters for instantiate state machinevoid setStateMachineConfiguration(StateMachineConfiguration configure)
configure - state machine default configurationCopyright © 2013–2016. All rights reserved.