S
- the type of stateE
- the type of eventpublic class DefaultStateConfigurer<S,E> extends AnnotationConfigurerAdapter<StatesData<S,E>,StateMachineStateConfigurer<S,E>,StateMachineStateBuilder<S,E>> implements StateConfigurer<S,E>
StateConfigurer
.StateConfigurer.History
Constructor and Description |
---|
DefaultStateConfigurer() |
Modifier and Type | Method and Description |
---|---|
StateConfigurer<S,E> |
choice(S choice)
Specify a state
S to be choice pseudo state. |
void |
configure(StateMachineStateBuilder<S,E> builder)
Configure the
AnnotationBuilder by setting the necessary properties
on the AnnotationBuilder . |
StateConfigurer<S,E> |
end(S end)
Specify a state
S to be end state. |
StateConfigurer<S,E> |
entry(S entry)
Specify a state
S to be entrypoint pseudo state. |
StateConfigurer<S,E> |
exit(S exit)
Specify a state
S to be exitpoint pseudo state. |
StateConfigurer<S,E> |
fork(S fork)
Specify a state
S to be fork pseudo state. |
StateConfigurer<S,E> |
history(S history,
StateConfigurer.History type)
Specify a state
S to be history pseudo state. |
StateConfigurer<S,E> |
initial(S initial)
Specify a initial state
S . |
StateConfigurer<S,E> |
initial(S initial,
Action<S,E> action)
Specify a initial state
S with an Action to be executed
with it. |
StateConfigurer<S,E> |
join(S join)
Specify a state
S to be join pseudo state. |
StateConfigurer<S,E> |
junction(S junction)
Specify a state
S to be junction pseudo state. |
StateConfigurer<S,E> |
parent(S state)
Specify a states configured by this configurer instance to be
substates of state
S . |
StateConfigurer<S,E> |
region(java.lang.String id)
Specify a region for these states configured by this configurer instance.
|
StateConfigurer<S,E> |
state(S state)
Specify a state
S . |
StateConfigurer<S,E> |
state(S state,
Action<S,E> stateAction)
Specify a state
S with state Action . |
StateConfigurer<S,E> |
state(S state,
Action<S,E> entryAction,
Action<S,E> exitAction)
Specify a state
S with entry and exit Action . |
StateConfigurer<S,E> |
state(S state,
java.util.Collection<? extends Action<S,E>> stateActions)
Specify a state
S with state Action s. |
StateConfigurer<S,E> |
state(S state,
java.util.Collection<? extends Action<S,E>> entryActions,
java.util.Collection<? extends Action<S,E>> exitActions)
Specify a state
S with entry and exit Action s. |
StateConfigurer<S,E> |
state(S state,
E... deferred)
Specify a state
S with a deferred events E . |
StateConfigurer<S,E> |
state(S state,
StateMachine<S,E> stateMachine)
Specify a state
S and its relation with a given
machine as substate machine. |
StateConfigurer<S,E> |
state(S state,
StateMachineFactory<S,E> stateMachineFactory)
Specify a state
S and its relation with a given
machine as substate machine factory. |
StateConfigurer<S,E> |
stateDo(S state,
Action<S,E> action)
Specify a state
S with state behaviour Action . |
StateConfigurer<S,E> |
stateDo(S state,
Action<S,E> action,
Action<S,E> error)
|
StateConfigurer<S,E> |
stateEntry(S state,
Action<S,E> action)
Specify a state
S with state entry Action . |
StateConfigurer<S,E> |
stateEntry(S state,
Action<S,E> action,
Action<S,E> error)
|
StateConfigurer<S,E> |
stateExit(S state,
Action<S,E> action)
Specify a state
S with state exit Action . |
StateConfigurer<S,E> |
stateExit(S state,
Action<S,E> action,
Action<S,E> error)
|
StateConfigurer<S,E> |
states(java.util.Set<S> states)
Specify a states
S . |
addObjectPostProcessor, and, getBuilder, init, isAssignable, setBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and
public void configure(StateMachineStateBuilder<S,E> builder) throws java.lang.Exception
AnnotationConfigurer
AnnotationBuilder
by setting the necessary properties
on the AnnotationBuilder
.configure
in interface AnnotationConfigurer<StatesData<S,E>,StateMachineStateBuilder<S,E>>
configure
in class AnnotationConfigurerAdapter<StatesData<S,E>,StateMachineStateConfigurer<S,E>,StateMachineStateBuilder<S,E>>
builder
- the builderjava.lang.Exception
- if error occurredpublic StateConfigurer<S,E> initial(S initial)
StateConfigurer
S
.initial
in interface StateConfigurer<S,E>
initial
- the initial statepublic StateConfigurer<S,E> initial(S initial, Action<S,E> action)
StateConfigurer
S
with an Action
to be executed
with it. Action can be i.e. used to init extended variables.initial
in interface StateConfigurer<S,E>
initial
- the initial stateaction
- the actionpublic StateConfigurer<S,E> parent(S state)
StateConfigurer
S
.parent
in interface StateConfigurer<S,E>
state
- the parent statepublic StateConfigurer<S,E> region(java.lang.String id)
StateConfigurer
region
in interface StateConfigurer<S,E>
id
- the region idpublic StateConfigurer<S,E> end(S end)
StateConfigurer
S
to be end state. This method
can be called for each state to be marked as end state.end
in interface StateConfigurer<S,E>
end
- the end statepublic StateConfigurer<S,E> state(S state)
StateConfigurer
S
.state
in interface StateConfigurer<S,E>
state
- the statepublic StateConfigurer<S,E> state(S state, StateMachine<S,E> stateMachine)
StateConfigurer
S
and its relation with a given
machine as substate machine.state
in interface StateConfigurer<S,E>
state
- the statestateMachine
- the submachinepublic StateConfigurer<S,E> state(S state, StateMachineFactory<S,E> stateMachineFactory)
StateConfigurer
S
and its relation with a given
machine as substate machine factory.state
in interface StateConfigurer<S,E>
state
- the statestateMachineFactory
- the submachine factorypublic StateConfigurer<S,E> state(S state, java.util.Collection<? extends Action<S,E>> stateActions)
StateConfigurer
S
with state Action
s.state
in interface StateConfigurer<S,E>
state
- the statestateActions
- the state actionspublic StateConfigurer<S,E> state(S state, Action<S,E> stateAction)
StateConfigurer
S
with state Action
.state
in interface StateConfigurer<S,E>
state
- the statestateAction
- the state actionpublic StateConfigurer<S,E> stateDo(S state, Action<S,E> action)
StateConfigurer
S
with state behaviour Action
.
Currently synonym for StateConfigurer.state(Object, Action)
.stateDo
in interface StateConfigurer<S,E>
state
- the stateaction
- the state actionStateConfigurer.state(Object, Action)
public StateConfigurer<S,E> stateDo(S state, Action<S,E> action, Action<S,E> error)
StateConfigurer
stateDo
in interface StateConfigurer<S,E>
state
- the stateaction
- the state actionerror
- action that will be called if any unexpected exception is thrown by the action.public StateConfigurer<S,E> state(S state, java.util.Collection<? extends Action<S,E>> entryActions, java.util.Collection<? extends Action<S,E>> exitActions)
StateConfigurer
S
with entry and exit Action
s.state
in interface StateConfigurer<S,E>
state
- the stateentryActions
- the state entry actionsexitActions
- the state exit actionspublic StateConfigurer<S,E> state(S state, Action<S,E> entryAction, Action<S,E> exitAction)
StateConfigurer
S
with entry and exit Action
.state
in interface StateConfigurer<S,E>
state
- the stateentryAction
- the state entry actionexitAction
- the state exit actionpublic StateConfigurer<S,E> stateEntry(S state, Action<S,E> action)
StateConfigurer
S
with state entry Action
.
Currently synonym for StateConfigurer.state(Object, Action, Action)
with no exit action.stateEntry
in interface StateConfigurer<S,E>
state
- the stateaction
- the state entry actionStateConfigurer.state(Object, Action, Action)
public StateConfigurer<S,E> stateEntry(S state, Action<S,E> action, Action<S,E> error)
StateConfigurer
S
with state entry Action
and
error Action
callback.
Currently synonym for StateConfigurer.state(Object, Action, Action)
with no exit action.stateEntry
in interface StateConfigurer<S,E>
state
- the stateaction
- the state entry actionerror
- action that will be called if any unexpected exception is thrown by the action.StateConfigurer.state(Object, Action, Action)
public StateConfigurer<S,E> stateExit(S state, Action<S,E> action)
StateConfigurer
S
with state exit Action
.
Currently synonym for StateConfigurer.state(Object, Action, Action)
with no entry action.stateExit
in interface StateConfigurer<S,E>
state
- the stateaction
- the state exit actionStateConfigurer.state(Object, Action, Action)
public StateConfigurer<S,E> stateExit(S state, Action<S,E> action, Action<S,E> error)
StateConfigurer
S
with state exit Action
and
error Action
callback.
Currently synonym for StateConfigurer.state(Object, Action, Action)
with no entry action.stateExit
in interface StateConfigurer<S,E>
state
- the stateaction
- the state entry actionerror
- action that will be called if any unexpected exception is thrown by the action.StateConfigurer.state(Object, Action, Action)
public StateConfigurer<S,E> state(S state, E... deferred)
StateConfigurer
S
with a deferred events E
.state
in interface StateConfigurer<S,E>
state
- the statedeferred
- the deferred eventspublic StateConfigurer<S,E> states(java.util.Set<S> states)
StateConfigurer
S
.states
in interface StateConfigurer<S,E>
states
- the statespublic StateConfigurer<S,E> choice(S choice)
StateConfigurer
S
to be choice pseudo state.choice
in interface StateConfigurer<S,E>
choice
- the choice pseudo statepublic StateConfigurer<S,E> junction(S junction)
StateConfigurer
S
to be junction pseudo state.junction
in interface StateConfigurer<S,E>
junction
- the junction pseudo statepublic StateConfigurer<S,E> fork(S fork)
StateConfigurer
S
to be fork pseudo state.fork
in interface StateConfigurer<S,E>
fork
- the fork pseudo statepublic StateConfigurer<S,E> join(S join)
StateConfigurer
S
to be join pseudo state.join
in interface StateConfigurer<S,E>
join
- the join pseudo statepublic StateConfigurer<S,E> history(S history, StateConfigurer.History type)
StateConfigurer
S
to be history pseudo state.history
in interface StateConfigurer<S,E>
history
- the history pseudo statetype
- the history pseudo state typepublic StateConfigurer<S,E> entry(S entry)
StateConfigurer
S
to be entrypoint pseudo state.entry
in interface StateConfigurer<S,E>
entry
- the entrypoint pseudo statepublic StateConfigurer<S,E> exit(S exit)
StateConfigurer
S
to be exitpoint pseudo state.exit
in interface StateConfigurer<S,E>
exit
- the exitpoint pseudo state