public interface StateContext<S,E>
StateContext
is representing of a current context used in
various stages in a state machine execution. These include for example
Transition
s, Action
s and Guard
s order to get access
to event headers and ExtendedState
.
Context really is not a current state of a state machine but more like a snapshot of where state machine is when this context is passed to various methods.
Modifier and Type | Interface and Description |
---|---|
static class |
StateContext.Stage
Enumeration of possible stages context is attached.
|
Modifier and Type | Method and Description |
---|---|
E |
getEvent()
Gets the event associated with a context.
|
java.lang.Exception |
getException()
Gets the exception associated with a context.
|
ExtendedState |
getExtendedState()
Gets the state machine extended state.
|
org.springframework.messaging.Message<E> |
getMessage()
Gets the message associated with a context.
|
java.lang.Object |
getMessageHeader(java.lang.Object header)
Gets the message header.
|
org.springframework.messaging.MessageHeaders |
getMessageHeaders()
Gets the event message headers.
|
State<S,E> |
getSource()
Gets the source state of this context.
|
java.util.Collection<State<S,E>> |
getSources()
Gets the source states of this context.
|
StateContext.Stage |
getStage()
Gets the stage this context is attached.
|
StateMachine<S,E> |
getStateMachine()
Gets the state machine.
|
State<S,E> |
getTarget()
Gets the target state of this context.
|
java.util.Collection<State<S,E>> |
getTargets()
Gets the target states of this context.
|
Transition<S,E> |
getTransition()
Gets the transition.
|
StateContext.Stage getStage()
org.springframework.messaging.Message<E> getMessage()
E getEvent()
org.springframework.messaging.MessageHeaders getMessageHeaders()
java.lang.Object getMessageHeader(java.lang.Object header)
String
object's
Object.toString()
method is used to resolve a key name.header
- the headerExtendedState getExtendedState()
Transition<S,E> getTransition()
StateMachine<S,E> getStateMachine()
State<S,E> getSource()
java.util.Collection<State<S,E>> getSources()
getSource()
State<S,E> getTarget()
java.util.Collection<State<S,E>> getTargets()
getTarget()
java.lang.Exception getException()