S - the type of stateE - the type of eventpublic abstract class AbstractTransition<S,E> extends java.lang.Object implements Transition<S,E>
Transition.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> |
actions |
protected State<S,E> |
target |
| Constructor and Description |
|---|
AbstractTransition(State<S,E> source,
State<S,E> target,
java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> actions,
E event,
TransitionKind kind,
java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Boolean>> guard,
Trigger<S,E> trigger)
Instantiates a new abstract transition.
|
AbstractTransition(State<S,E> source,
State<S,E> target,
java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> actions,
E event,
TransitionKind kind,
java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Boolean>> guard,
Trigger<S,E> trigger,
SecurityRule securityRule,
java.lang.String name)
Instantiates a new abstract transition.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(ActionListener<S,E> listener)
Adds the action listener.
|
reactor.core.publisher.Mono<java.lang.Void> |
executeTransitionActions(StateContext<S,E> context)
Execute transition actions.
|
java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> |
getActions()
Gets the transition actions.
|
java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Boolean>> |
getGuard()
Gets the guard of this transition.
|
TransitionKind |
getKind()
Gets the transition kind.
|
java.lang.String |
getName()
Gets the name.
|
SecurityRule |
getSecurityRule()
Gets the security rule.
|
State<S,E> |
getSource()
Gets the source state of this transition.
|
State<S,E> |
getTarget()
Gets the target state of this transition.
|
Trigger<S,E> |
getTrigger()
Gets the transition trigger.
|
void |
removeActionListener(ActionListener<S,E> listener)
Removes the action listener.
|
java.lang.String |
toString() |
reactor.core.publisher.Mono<java.lang.Boolean> |
transit(StateContext<S,E> context)
Transit this transition with a give state context.
|
protected final java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> actions
public AbstractTransition(State<S,E> source, State<S,E> target, java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> actions, E event, TransitionKind kind, java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Boolean>> guard, Trigger<S,E> trigger)
source - the sourcetarget - the targetactions - the actionsevent - the eventkind - the kindguard - the guardtrigger - the triggerpublic AbstractTransition(State<S,E> source, State<S,E> target, java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> actions, E event, TransitionKind kind, java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Boolean>> guard, Trigger<S,E> trigger, SecurityRule securityRule, java.lang.String name)
source - the sourcetarget - the targetactions - the actionsevent - the eventkind - the kindguard - the guardtrigger - the triggersecurityRule - the security rulepublic State<S,E> getSource()
TransitiongetSource in interface Transition<S,E>public Trigger<S,E> getTrigger()
TransitiongetTrigger in interface Transition<S,E>public reactor.core.publisher.Mono<java.lang.Boolean> transit(StateContext<S,E> context)
Transitiontransit in interface Transition<S,E>context - the state contextpublic java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Boolean>> getGuard()
TransitiongetGuard in interface Transition<S,E>public TransitionKind getKind()
TransitiongetKind in interface Transition<S,E>public SecurityRule getSecurityRule()
TransitiongetSecurityRule in interface Transition<S,E>public State<S,E> getTarget()
TransitiongetTarget in interface Transition<S,E>public java.lang.String getName()
TransitiongetName in interface Transition<S,E>public java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> getActions()
TransitiongetActions in interface Transition<S,E>public void addActionListener(ActionListener<S,E> listener)
TransitionaddActionListener in interface Transition<S,E>listener - the listenerpublic void removeActionListener(ActionListener<S,E> listener)
TransitionremoveActionListener in interface Transition<S,E>listener - the listenerpublic reactor.core.publisher.Mono<java.lang.Void> executeTransitionActions(StateContext<S,E> context)
TransitionexecuteTransitionActions in interface Transition<S,E>context - the state contextpublic java.lang.String toString()
toString in class java.lang.Object