S
- the type of stateE
- the type of eventpublic class DefaultExternalTransitionConfigurer<S,E> extends AbstractTransitionConfigurer<S,E> implements ExternalTransitionConfigurer<S,E>
ExternalTransitionConfigurer
.Constructor and Description |
---|
DefaultExternalTransitionConfigurer() |
Modifier and Type | Method and Description |
---|---|
ExternalTransitionConfigurer<S,E> |
action(Action<S,E> action)
Specify
Action for this Transition . |
ExternalTransitionConfigurer<S,E> |
action(Action<S,E> action,
Action<S,E> error)
Specify
Action for this Transition . |
void |
configure(StateMachineTransitionBuilder<S,E> builder)
Configure the
AnnotationBuilder by setting the necessary properties
on the AnnotationBuilder . |
ExternalTransitionConfigurer<S,E> |
event(E event)
Specify event
E for this Transition which will be triggered
by a event trigger. |
ExternalTransitionConfigurer<S,E> |
guard(Guard<S,E> guard)
Specify a
Guard for this Transition . |
ExternalTransitionConfigurer<S,E> |
guardExpression(java.lang.String expression)
Specify a
Guard backed by a SpEL expression for this Transition . |
ExternalTransitionConfigurer<S,E> |
secured(java.lang.String expression)
Specify a security expression for this
Transition . |
ExternalTransitionConfigurer<S,E> |
secured(java.lang.String attributes,
SecurityRule.ComparisonType match)
Specify a security attributes for this
Transition . |
ExternalTransitionConfigurer<S,E> |
source(S source)
Specify a source state
S for this Transition . |
ExternalTransitionConfigurer<S,E> |
state(S state)
Specify a state this transition should belong to.
|
ExternalTransitionConfigurer<S,E> |
target(S target)
Specify a target state
S for this Transition . |
ExternalTransitionConfigurer<S,E> |
timer(long period)
Specify that this transition is triggered by a time.
|
ExternalTransitionConfigurer<S,E> |
timerOnce(long period)
Specify that this transition is triggered once by a time after a delay.
|
addAction, addAction, getActions, getCount, getEvent, getGuard, getPeriod, getSecurityRule, getSource, getState, getTarget, setCount, setEvent, setGuard, setPeriod, setSecurityRule, setSecurityRule, setSource, setState, setTarget
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 ExternalTransitionConfigurer<S,E> source(S source)
TransitionConfigurer
S
for this Transition
.source
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
source
- the source state S
public ExternalTransitionConfigurer<S,E> target(S target)
ExternalTransitionConfigurer
S
for this Transition
.target
in interface ExternalTransitionConfigurer<S,E>
target
- the target state S
public ExternalTransitionConfigurer<S,E> state(S state)
TransitionConfigurer
state
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
state
- the state S
public ExternalTransitionConfigurer<S,E> event(E event)
TransitionConfigurer
E
for this Transition
which will be triggered
by a event trigger.event
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
event
- the event for transitionpublic ExternalTransitionConfigurer<S,E> timer(long period)
TransitionConfigurer
timer
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
period
- timer period in millispublic ExternalTransitionConfigurer<S,E> timerOnce(long period)
TransitionConfigurer
timerOnce
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
period
- timer period in millispublic ExternalTransitionConfigurer<S,E> action(Action<S,E> action)
TransitionConfigurer
Action
for this Transition
.action
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
action
- the actionpublic ExternalTransitionConfigurer<S,E> action(Action<S,E> action, Action<S,E> error)
TransitionConfigurer
Action
for this Transition
.action
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
action
- the actionerror
- action that will be called if any unexpected exception is thrown by the action.public ExternalTransitionConfigurer<S,E> guard(Guard<S,E> guard)
TransitionConfigurer
Guard
for this Transition
.guard
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
guard
- the guardpublic ExternalTransitionConfigurer<S,E> guardExpression(java.lang.String expression)
TransitionConfigurer
Guard
backed by a SpEL expression for this Transition
.guardExpression
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
expression
- the SpEL expressionpublic ExternalTransitionConfigurer<S,E> secured(java.lang.String attributes, SecurityRule.ComparisonType match)
TransitionConfigurer
Transition
.secured
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
attributes
- the security attributesmatch
- the match typepublic ExternalTransitionConfigurer<S,E> secured(java.lang.String expression)
TransitionConfigurer
Transition
.secured
in interface TransitionConfigurer<ExternalTransitionConfigurer<S,E>,S,E>
expression
- the security expression