S - StateE - EventT - Event Typepublic interface SimpleStateMachine<S,E,T> extends StateMachine<S,E,T>
| Modifier and Type | Method and Description |
|---|---|
S |
run(Iterable<? extends E> events)
Executes the state machine with a series of Events.
|
S |
run(S current,
E event)
Executes the state machine for a single event, starting in the specified
state.
|
SimpleStatefulStateMachine<S,E,T> |
withState() |
SimpleStatefulStateMachine<S,E,T> |
withState(S current) |
getEventClass, getEventTypeClass, getInitialState, getStateClass, getTransitionsS run(Iterable<? extends E> events) throws StateMachineException
events - The series of events as an Iterable.DeadEndException - If the state machine is stuck due to no transition being
eligible.EventTypeClassifierException - If the EventTypeClassifier associated with this state
machine fails during execution. The original exception will be
the cause for this exception.StateHandlerException - If one of the encompassed states implements
StateWithEnterHandler or StateWithExitHandler and
throws an error during execution of its handler method.StateMachineException - If an internal error happens, for example a
GuardEvaluationException.S run(S current, E event) throws StateMachineException
current - The state to start in.event - The event to execute the state machine for.DeadEndException - If the state machine is stuck due to no transition being
eligible.EventTypeClassifierException - If the EventTypeClassifier associated with this state
machine fails during execution. The original exception will be
the cause for this exception.StateHandlerException - If one of the encompassed states implements
StateWithEnterHandler or StateWithExitHandler and
throws an error during execution of its handler method.StateMachineException - If an internal error happens, for example a
GuardEvaluationException.SimpleStatefulStateMachine<S,E,T> withState()
SimpleStatefulStateMachine<S,E,T> withState(S current)
Copyright © 2015. All rights reserved.