C - ContextS - StateE - EventT - Event Typepublic interface StateMachineWithContext<S,E,T,C> extends StateMachine<S,E,T>
SimpleStateMachine with a computational context.| Modifier and Type | Method and Description |
|---|---|
Class<C> |
getContextClass()
Get the class that implements the context of this state machine.
|
RunResult<S,C> |
run(Iterable<? extends E> events,
C context)
Executes the state machine with a series of Events and a Context.
|
RunResult<S,C> |
run(S current,
E event,
C context)
Executes the state machine for a single event, starting in the specified
state.
|
StatefulStateMachineWithContext<S,E,T,C> |
withState(C context) |
StatefulStateMachineWithContext<S,E,T,C> |
withState(C context,
S current) |
getEventClass, getEventTypeClass, getInitialState, getStateClass, getTransitionsRunResult<S,C> run(Iterable<? extends E> events, C context) 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.RunResult<S,C> run(S current, E event, C context) throws StateMachineException
current - The state to start in.event - The event to execute the state machine for.context - A context object.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.Class<C> getContextClass()
Copyright © 2015. All rights reserved.