public static class StateMachineBuilder.OnBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
StateMachineBuilder.OnBuilder |
arriving(@NonNull Function<StateContext,Status> handler)
Adds a filtering function for incoming messages in target state
of the transition by transforming the current target state into
a
FilteredState. |
StateMachine |
build()
Finish the current transition and retrieves
the current state machine built instance.
|
StateMachineBuilder |
builder()
Retrieves the current State Machine builder
|
StateMachineBuilder.FromBuilder |
from(State state)
Starts a new transition from the given
state using an empty
message for the current transition.
|
StateMachineBuilder.FromBuilder |
from(String state)
Starts a new transition from the given
state name using an empty
message for the current transition.
|
StateMachineBuilder.OnBuilder |
leaving(Function<StateContext,Status> handler)
Adds a filtering function for triggering messages from origin state
of the transition by transforming the current origin state into
a
FilteredState. |
StateMachineBuilder.ToBuilder |
selfLoop(State state)
Creates a self loop for the given state.
|
StateMachineBuilder.ToBuilder |
selfLoop(String state)
Creates a self loop for the state
specified by the given name.
|
public StateMachineBuilder.OnBuilder leaving(Function<StateContext,Status> handler)
FilteredState.handler - the handler function to execute when leaving originStateMachineBuilder.OnBuilder instancepublic StateMachineBuilder.OnBuilder arriving(@NonNull @NonNull Function<StateContext,Status> handler)
FilteredState.handler - the handler function to execute when arriving targetStateMachineBuilder.OnBuilder instancepublic StateMachineBuilder.FromBuilder from(String state)
state - the next source statepublic StateMachineBuilder.FromBuilder from(State state)
state - the next source statepublic StateMachineBuilder.ToBuilder selfLoop(String state)
state - the state namepublic StateMachineBuilder.ToBuilder selfLoop(State state)
state - the statepublic StateMachine build()
public StateMachineBuilder builder()
Copyright © 2019 state-machine. All rights reserved.