| Modifier and Type | Method and Description |
|---|---|
TransitionIndex<State,Message,StateTransition> |
StateMachine.getTransitionsIndex()
Retrieves the transition map
|
| Modifier and Type | Method and Description |
|---|---|
Optional<State> |
StateMachine.getNext(Message m)
Retrieves the next state upon
message reception.
|
StateMachine |
StateMachine.send(Message message)
Sends a message to the state machine triggering
a potential transition.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Transition<N extends Node,M extends Message>
A generic contract allowing to identify
the target destination after processing
the message.
|
| Modifier and Type | Field and Description |
|---|---|
protected Message |
Status.message
The emitted message
|
protected M |
Transition.message
The Message triggering the transition
|
| Modifier and Type | Method and Description |
|---|---|
static Status |
Status.forward(Message message)
Creates an status to request the emission of a new
message.
|
| Constructor and Description |
|---|
Status(String statusName,
Message message,
boolean validity)
Constructor with name, message and validity.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Exporter<R,N extends Node,M extends Message,T extends Transitioner<N,M,? extends Transition<N,M>>>
Defines the methods to export a
Transitioner to
a given result type. |
| Modifier and Type | Method and Description |
|---|---|
Function<C,Status> |
FunctionMessageFilter.getDispatchHandler(@NonNull Message message)
Retrieves the dispatch handler for the given message
|
Function<C,Status> |
FunctionMessageFilter.getReceptionHandler(@NonNull Message message)
Retrieves the reception handler for the given message
|
void |
FunctionMessageFilter.removeDispatchHandler(@NonNull Message message)
Removes the dispatch handler for the
given message.
|
void |
FunctionMessageFilter.removeReceptionHandler(@NonNull Message message)
Removes the reception handler for the
given message.
|
void |
FunctionMessageFilter.setDispatchHandler(@NonNull Message message,
@NonNull Function<C,Status> function)
Sets the given function to handle the message to be
dispatched.
|
void |
FunctionMessageFilter.setReceptionHandler(@NonNull Message message,
@NonNull Function<C,Status> function)
Sets the given function to handle the message to be
received.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Importer<I,N extends Node,M extends Message,T extends Transitioner<N,M,? extends Transition<N,M>>>
Defines the methods to import a
Transitioner from
a given input source. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractEnvelope<N extends Node,M extends Message>
Base class for
Envelope implementors. |
interface |
Envelope<N extends Node,M extends Message>
This interface allows wrapping a message with the source/target information
in order to be transmitted to interested parties (e.g.
|
| Modifier and Type | Class and Description |
|---|---|
class |
VoidMessage
Represents an empty/null message
|
| Modifier and Type | Field and Description |
|---|---|
static Message |
Messages.ANY
A void message used as marker representing any kind of message
|
static Message |
Messages.EMPTY
A void message used as marker representing an empty message
|
protected M |
AbstractEnvelope.message
The message
|
static Message |
Messages.NULL
A void message used as marker representing an empty message
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
TransitionChecker<N extends Node,M extends Message>
The transition checker acts a validator that is used
by a given State Machine to allow/deny a given transition.
|
interface |
Transitioner<N extends Node,M extends Message,T extends Transition<N,M>>
An interface for defining methods common to entities
handling transitions between nodes.
|
interface |
TransitionIndex<N extends Node,M extends Message,T extends Transition<N,M>>
An index allowing to store and fetch defined transitions.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
TransitionValidator<N extends Node,M extends Message,T extends Transition<N,M>>
The transition validator verifies operations
involved in transition management with respect to a given
index.
|
| Modifier and Type | Method and Description |
|---|---|
StateMachineBuilder.OnBuilder |
StateMachineBuilder.ToBuilder.on(Message message)
Ends the transition by applying a custom message and
retrieving the initial builder.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractStatesExporter<R,S extends State,M extends Message,T extends Transitioner<S,M,? extends Transition<S,M>>> |
| Modifier and Type | Method and Description |
|---|---|
Map<State,Map<Message,State>> |
StateTransitionMap.getTransitionsAsMap()
Retrieves the transitions as a map
|
| Modifier and Type | Method and Description |
|---|---|
Optional<State> |
StateTransitionMap.getNext(@NonNull State source,
@NonNull Message m)
Retrieves the next state in the transition from
source state upon message m reception
|
Optional<State> |
StateTransitionMap.getPrevious(State source,
Message m)
Retrieves the previous node upon reception of the
message on the given source node.
|
| Modifier and Type | Method and Description |
|---|---|
ValidationResult |
StateTransitionValidator.validate(StateTransition transition,
TransitionIndex<State,Message,StateTransition> transitionIndex,
TransitionValidator.Operation operation)
Checks the transition parameter correctness
with respect to current transitions on the given
index before applying the operation.
|
Status |
StateTransitionChecker.validateArrival(Envelope<State,Message> envelope)
Validates the arrival to a given target state upon reception
of a given message using the specified transition index to ensure
transitions are accepted.
|
Status |
StateTransitionChecker.validateDeparture(Envelope<State,Message> envelope)
Validates the departure from the current state upon reception
of a given message using the specified transition index to ensure
transitions are accepted.
|
| Modifier and Type | Class and Description |
|---|---|
class |
StringMessage
An implementation of the Message interface
with a String payload.
|
| Modifier and Type | Method and Description |
|---|---|
void |
FilteredState.setDispatchHandler(Message message,
Function<StateContext,Status> dispatchHandler)
Sets the dispatch handler for the given message
|
abstract void |
AbstractFilteredState.setDispatchHandler(Message message,
Function<StateContext,Status> dispatchHandler)
Sets the dispatch handler for the given message
|
void |
FilteredState.setReceptionHandler(Message message,
Function<StateContext,Status> receptionHandler)
Sets the reception handler for the given message
|
abstract void |
AbstractFilteredState.setReceptionHandler(Message message,
Function<StateContext,Status> receptionHandler)
Sets the reception handler for the given message
|
| Constructor and Description |
|---|
SimpleEnvelope(State source,
Message message,
State target,
TransitionIndex<State,Message,StateTransition> transitionIndex) |
StateContext(Event event,
State source,
State target,
Message message)
Default constructor with all context information.
|
StateTransition(State origin,
Message message,
State target)
Creates a new state transition with the given
origin and destination states after applying the message.
|
StateTransition(State origin,
Message message,
String target)
Creates a new state transition with the given
origin and destination state names after applying the message.
|
StateTransition(String origin,
Message message,
State target)
Creates a new state transition with the given
origin and destination state names after applying the message.
|
StateTransition(String origin,
Message message,
String target)
Creates a new state transition with the given
origin and destination state names after applying the message.
|
| Constructor and Description |
|---|
SimpleEnvelope(State source,
Message message,
State target,
TransitionIndex<State,Message,StateTransition> transitionIndex) |
Copyright © 2019 state-machine. All rights reserved.