S - the type of stateE - the type of eventpublic class DefaultStateContext<S,E> extends java.lang.Object implements StateContext<S,E>
StateContext.StateContext.Stage| Constructor and Description |
|---|
DefaultStateContext(StateContext.Stage stage,
org.springframework.messaging.Message<E> message,
org.springframework.messaging.MessageHeaders messageHeaders,
ExtendedState extendedState,
Transition<S,E> transition,
StateMachine<S,E> stateMachine,
State<S,E> source,
State<S,E> target,
java.util.Collection<State<S,E>> sources,
java.util.Collection<State<S,E>> targets,
java.lang.Exception exception)
Instantiates a new default state context.
|
DefaultStateContext(StateContext.Stage stage,
org.springframework.messaging.Message<E> message,
org.springframework.messaging.MessageHeaders messageHeaders,
ExtendedState extendedState,
Transition<S,E> transition,
StateMachine<S,E> stateMachine,
State<S,E> source,
State<S,E> target,
java.lang.Exception exception)
Instantiates a new default state context.
|
| 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.
|
java.lang.String |
toString() |
public DefaultStateContext(StateContext.Stage stage, org.springframework.messaging.Message<E> message, org.springframework.messaging.MessageHeaders messageHeaders, ExtendedState extendedState, Transition<S,E> transition, StateMachine<S,E> stateMachine, State<S,E> source, State<S,E> target, java.lang.Exception exception)
stage - the stagemessage - the messagemessageHeaders - the message headersextendedState - the extended statetransition - the transitionstateMachine - the state machinesource - the sourcetarget - the targetexception - the exceptionpublic DefaultStateContext(StateContext.Stage stage, org.springframework.messaging.Message<E> message, org.springframework.messaging.MessageHeaders messageHeaders, ExtendedState extendedState, Transition<S,E> transition, StateMachine<S,E> stateMachine, State<S,E> source, State<S,E> target, java.util.Collection<State<S,E>> sources, java.util.Collection<State<S,E>> targets, java.lang.Exception exception)
stage - the stagemessage - the messagemessageHeaders - the message headersextendedState - the extended statetransition - the transitionstateMachine - the state machinesource - the sourcetarget - the targetsources - the sourcestargets - the targetsexception - the exceptionpublic StateContext.Stage getStage()
StateContextgetStage in interface StateContext<S,E>public E getEvent()
StateContextgetEvent in interface StateContext<S,E>public org.springframework.messaging.Message<E> getMessage()
StateContextgetMessage in interface StateContext<S,E>public org.springframework.messaging.MessageHeaders getMessageHeaders()
StateContextgetMessageHeaders in interface StateContext<S,E>public java.lang.Object getMessageHeader(java.lang.Object header)
StateContextString object's
Object.toString() method is used to resolve a key name.getMessageHeader in interface StateContext<S,E>header - the headerpublic ExtendedState getExtendedState()
StateContextgetExtendedState in interface StateContext<S,E>public Transition<S,E> getTransition()
StateContextgetTransition in interface StateContext<S,E>public StateMachine<S,E> getStateMachine()
StateContextgetStateMachine in interface StateContext<S,E>public State<S,E> getSource()
StateContextgetSource in interface StateContext<S,E>public java.util.Collection<State<S,E>> getSources()
StateContextgetSources in interface StateContext<S,E>StateContext.getSource()public State<S,E> getTarget()
StateContextgetTarget in interface StateContext<S,E>public java.util.Collection<State<S,E>> getTargets()
StateContextgetTargets in interface StateContext<S,E>StateContext.getTarget()public java.lang.Exception getException()
StateContextgetException in interface StateContext<S,E>public java.lang.String toString()
toString in class java.lang.Object