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()
StateContext
getStage
in interface StateContext<S,E>
public E getEvent()
StateContext
getEvent
in interface StateContext<S,E>
public org.springframework.messaging.Message<E> getMessage()
StateContext
getMessage
in interface StateContext<S,E>
public org.springframework.messaging.MessageHeaders getMessageHeaders()
StateContext
getMessageHeaders
in interface StateContext<S,E>
public java.lang.Object getMessageHeader(java.lang.Object header)
StateContext
String
object's
Object.toString()
method is used to resolve a key name.getMessageHeader
in interface StateContext<S,E>
header
- the headerpublic ExtendedState getExtendedState()
StateContext
getExtendedState
in interface StateContext<S,E>
public Transition<S,E> getTransition()
StateContext
getTransition
in interface StateContext<S,E>
public StateMachine<S,E> getStateMachine()
StateContext
getStateMachine
in interface StateContext<S,E>
public State<S,E> getSource()
StateContext
getSource
in interface StateContext<S,E>
public java.util.Collection<State<S,E>> getSources()
StateContext
getSources
in interface StateContext<S,E>
StateContext.getSource()
public State<S,E> getTarget()
StateContext
getTarget
in interface StateContext<S,E>
public java.util.Collection<State<S,E>> getTargets()
StateContext
getTargets
in interface StateContext<S,E>
StateContext.getTarget()
public java.lang.Exception getException()
StateContext
getException
in interface StateContext<S,E>
public java.lang.String toString()
toString
in class java.lang.Object