S
- the type of stateE
- the type of eventpublic class DefaultChoiceTransitionConfigurer<S,E> extends AnnotationConfigurerAdapter<TransitionsData<S,E>,StateMachineTransitionConfigurer<S,E>,StateMachineTransitionBuilder<S,E>> implements ChoiceTransitionConfigurer<S,E>
ChoiceTransitionConfigurer
.Constructor and Description |
---|
DefaultChoiceTransitionConfigurer() |
Modifier and Type | Method and Description |
---|---|
void |
configure(StateMachineTransitionBuilder<S,E> builder)
Configure the
AnnotationBuilder by setting the necessary properties
on the AnnotationBuilder . |
ChoiceTransitionConfigurer<S,E> |
first(S target,
Guard<S,E> guard)
Specify a target state
S as a first choice. |
ChoiceTransitionConfigurer<S,E> |
first(S target,
Guard<S,E> guard,
Action<S,E> action)
Specify a target state
S as a first choice associating an
Action to outgoing vertex. |
ChoiceTransitionConfigurer<S,E> |
first(S target,
Guard<S,E> guard,
Action<S,E> action,
Action<S,E> error)
Specify a target state
S as a first choice associating an
Action to outgoing vertex. |
ChoiceTransitionConfigurer<S,E> |
last(S target)
Specify a target state
S as a last choice. |
ChoiceTransitionConfigurer<S,E> |
last(S target,
Action<S,E> action)
Specify a target state
S as a last choice associating an
Action to outgoing vertex. |
ChoiceTransitionConfigurer<S,E> |
last(S target,
Action<S,E> action,
Action<S,E> error)
Specify a target state
S as a last choice associating an
Action to outgoing vertex. |
ChoiceTransitionConfigurer<S,E> |
source(S source)
Specify a source state
S for this Transition . |
ChoiceTransitionConfigurer<S,E> |
then(S target,
Guard<S,E> guard)
Specify a target state
S as a then choice. |
ChoiceTransitionConfigurer<S,E> |
then(S target,
Guard<S,E> guard,
Action<S,E> action)
Specify a target state
S as a then choice associating an
Action to outgoing vertex. |
ChoiceTransitionConfigurer<S,E> |
then(S target,
Guard<S,E> guard,
Action<S,E> action,
Action<S,E> error)
Specify a target state
S as a then choice associating an
Action to outgoing vertex. |
addObjectPostProcessor, and, getBuilder, init, isAssignable, setBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and
public void configure(StateMachineTransitionBuilder<S,E> builder) throws java.lang.Exception
AnnotationConfigurer
AnnotationBuilder
by setting the necessary properties
on the AnnotationBuilder
.configure
in interface AnnotationConfigurer<TransitionsData<S,E>,StateMachineTransitionBuilder<S,E>>
configure
in class AnnotationConfigurerAdapter<TransitionsData<S,E>,StateMachineTransitionConfigurer<S,E>,StateMachineTransitionBuilder<S,E>>
builder
- the builderjava.lang.Exception
- if error occurredpublic ChoiceTransitionConfigurer<S,E> source(S source)
ChoiceTransitionConfigurer
S
for this Transition
.source
in interface ChoiceTransitionConfigurer<S,E>
source
- the source state S
public ChoiceTransitionConfigurer<S,E> first(S target, Guard<S,E> guard)
ChoiceTransitionConfigurer
S
as a first choice.
This must be set.
In normal if/else if/else this would represent if.
first
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateguard
- the guard for this choicepublic ChoiceTransitionConfigurer<S,E> first(S target, Guard<S,E> guard, Action<S,E> action)
ChoiceTransitionConfigurer
S
as a first choice associating an
Action
to outgoing vertex. This must be set.
In normal if/else if/else this would represent if.
first
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateguard
- the guard for this choiceaction
- the actionpublic ChoiceTransitionConfigurer<S,E> first(S target, Guard<S,E> guard, Action<S,E> action, Action<S,E> error)
ChoiceTransitionConfigurer
S
as a first choice associating an
Action
to outgoing vertex. This must be set.
In normal if/else if/else this would represent if.
first
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateguard
- the guard for this choiceaction
- the actionerror
- action that will be called if any unexpected exception is thrown by the action.public ChoiceTransitionConfigurer<S,E> then(S target, Guard<S,E> guard)
ChoiceTransitionConfigurer
S
as a then choice.
This is optional. Multiple thens will preserve order.
In normal if/else if/else this would represent else if.
then
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateguard
- the guard for this choicepublic ChoiceTransitionConfigurer<S,E> then(S target, Guard<S,E> guard, Action<S,E> action)
ChoiceTransitionConfigurer
S
as a then choice associating an
Action
to outgoing vertex. This is optional. Multiple thens
will preserve order.
In normal if/else if/else this would represent else if.
then
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateguard
- the guard for this choiceaction
- the actionpublic ChoiceTransitionConfigurer<S,E> then(S target, Guard<S,E> guard, Action<S,E> action, Action<S,E> error)
ChoiceTransitionConfigurer
S
as a then choice associating an
Action
to outgoing vertex. This is optional. Multiple thens
will preserve order.
In normal if/else if/else this would represent else if.
then
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateguard
- the guard for this choiceaction
- the actionerror
- action that will be called if any unexpected exception is thrown by the action.public ChoiceTransitionConfigurer<S,E> last(S target)
ChoiceTransitionConfigurer
S
as a last choice.
This must be set.
In normal if/else if/else this would represent else.
last
in interface ChoiceTransitionConfigurer<S,E>
target
- the target statepublic ChoiceTransitionConfigurer<S,E> last(S target, Action<S,E> action)
ChoiceTransitionConfigurer
S
as a last choice associating an
Action
to outgoing vertex. This must be set.
In normal if/else if/else this would represent else.
last
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateaction
- the actionpublic ChoiceTransitionConfigurer<S,E> last(S target, Action<S,E> action, Action<S,E> error)
ChoiceTransitionConfigurer
S
as a last choice associating an
Action
to outgoing vertex. This must be set.
In normal if/else if/else this would represent else.
last
in interface ChoiceTransitionConfigurer<S,E>
target
- the target stateaction
- the actionerror
- action that will be called if any unexpected exception is thrown by the action.