|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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>
State machine builder API.
| Method Summary | |
|---|---|
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 |
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)
|
InternalTransitionBuilder<T,S,E,C> |
internalTransition()
Start to build internal transition |
InternalTransitionBuilder<T,S,E,C> |
internalTransition(int priority)
|
LocalTransitionBuilder<T,S,E,C> |
localTransition()
Start to build local transition |
LocalTransitionBuilder<T,S,E,C> |
localTransition(int 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()
|
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 |
| Method Detail |
|---|
ExternalTransitionBuilder<T,S,E,C> externalTransition()
ExternalTransitionBuilder<T,S,E,C> transition()
DeferBoundActionBuilder<T,S,E,C> transit()
LocalTransitionBuilder<T,S,E,C> localTransition()
InternalTransitionBuilder<T,S,E,C> internalTransition()
ExternalTransitionBuilder<T,S,E,C> externalTransition(int priority)
ExternalTransitionBuilder<T,S,E,C> transition(int priority)
priority - transition priority
LocalTransitionBuilder<T,S,E,C> localTransition(int priority)
InternalTransitionBuilder<T,S,E,C> internalTransition(int priority)
MutableState<T,S,E,C> defineState(S stateId)
stateId - id of new state
MutableState<T,S,E,C> defineFinalState(S stateId)
stateId - id of final state
MutableState<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 machine
MutableState<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 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 state
EntryExitActionBuilder<T,S,E,C> onExit(S stateId)
stateId - the id of state
T newStateMachine(S initialStateId)
initialStateId - initial state id
T newStateMachine(S initialStateId,
Object... extraParams)
initialStateId - the id of state machine initial stateextraParams - other parameters for instantiate state machine
T newStateMachine(S initialStateId,
StateMachineConfiguration configuration,
Object... extraParams)
initialStateId - the id of state machine initial stateconfiguration - configuration for state machineextraParams - other parameters for instantiate state machine
void setStateMachineConfiguration(StateMachineConfiguration configure)
configure - state machine default configuration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||