Class DefaultStateMachineContext<S,E>
java.lang.Object
org.springframework.statemachine.support.DefaultStateMachineContext<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
StateMachineContext<S,E>
Default implementation of a
StateMachineContext.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultStateMachineContext(List<String> childRefs, List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) Instantiates a new default state machine context.DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState) Instantiates a new default state machine context.DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates) Instantiates a new default state machine context.DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) Instantiates a new default state machine context.DefaultStateMachineContext(S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState) Instantiates a new default state machine context.DefaultStateMachineContext(S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates) Instantiates a new default state machine context.DefaultStateMachineContext(S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) Instantiates a new default state machine context. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the child context references if any.Gets the child contexts if any.getEvent()Gets the event.Gets the event headers.Gets the extended state.Gets the history state mappingsgetId()Gets the machine id.getState()Gets the state.inthashCode()toString()
-
Constructor Details
-
DefaultStateMachineContext
public DefaultStateMachineContext(S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState) Instantiates a new default state machine context.- Parameters:
state- the stateevent- the eventeventHeaders- the event headersextendedState- the extended state
-
DefaultStateMachineContext
public DefaultStateMachineContext(S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates) Instantiates a new default state machine context.- Parameters:
state- the stateevent- the eventeventHeaders- the event headersextendedState- the extended statehistoryStates- the history state mappings
-
DefaultStateMachineContext
public DefaultStateMachineContext(S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) Instantiates a new default state machine context.- Parameters:
state- the stateevent- the eventeventHeaders- the event headersextendedState- the extended statehistoryStates- the history state mappingsid- the machine id
-
DefaultStateMachineContext
public DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState) Instantiates a new default state machine context.- Parameters:
childs- the child state machine contextsstate- the stateevent- the eventeventHeaders- the event headersextendedState- the extended state
-
DefaultStateMachineContext
public DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates) Instantiates a new default state machine context.- Parameters:
childs- the child state machine contextsstate- the stateevent- the eventeventHeaders- the event headersextendedState- the extended statehistoryStates- the history state mappings
-
DefaultStateMachineContext
public DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) Instantiates a new default state machine context.- Parameters:
childs- the child state machine contextsstate- the stateevent- the eventeventHeaders- the event headersextendedState- the extended statehistoryStates- the history state mappingsid- the machine id
-
DefaultStateMachineContext
public DefaultStateMachineContext(List<String> childRefs, List<StateMachineContext<S, E>> childs, S state, E event, Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) Instantiates a new default state machine context.- Parameters:
childRefs- the child state machine context refschilds- the child state machine contextsstate- the stateevent- the eventeventHeaders- the event headersextendedState- the extended statehistoryStates- the history state mappingsid- the machine id
-
-
Method Details
-
getId
Description copied from interface:StateMachineContextGets the machine id.- Specified by:
getIdin interfaceStateMachineContext<S,E> - Returns:
- the machine id
-
getChilds
Description copied from interface:StateMachineContextGets the child contexts if any.- Specified by:
getChildsin interfaceStateMachineContext<S,E> - Returns:
- the child contexts
-
getChildReferences
Description copied from interface:StateMachineContextGets the child context references if any.- Specified by:
getChildReferencesin interfaceStateMachineContext<S,E> - Returns:
- the child context references
-
getState
Description copied from interface:StateMachineContextGets the state.- Specified by:
getStatein interfaceStateMachineContext<S,E> - Returns:
- the state
-
getHistoryStates
Description copied from interface:StateMachineContextGets the history state mappings- Specified by:
getHistoryStatesin interfaceStateMachineContext<S,E> - Returns:
- the history state mappings
-
getEvent
Description copied from interface:StateMachineContextGets the event.- Specified by:
getEventin interfaceStateMachineContext<S,E> - Returns:
- the event
-
getEventHeaders
Description copied from interface:StateMachineContextGets the event headers.- Specified by:
getEventHeadersin interfaceStateMachineContext<S,E> - Returns:
- the event headers
-
getExtendedState
Description copied from interface:StateMachineContextGets the extended state.- Specified by:
getExtendedStatein interfaceStateMachineContext<S,E> - Returns:
- the extended state
-
hashCode
public int hashCode() -
equals
-
toString
-