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
.- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorDescriptionDefaultStateMachineContext
(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 TypeMethodDescriptionboolean
Gets 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.int
hashCode()
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:StateMachineContext
Gets the machine id.- Specified by:
getId
in interfaceStateMachineContext<S,
E> - Returns:
- the machine id
-
getChilds
Description copied from interface:StateMachineContext
Gets the child contexts if any.- Specified by:
getChilds
in interfaceStateMachineContext<S,
E> - Returns:
- the child contexts
-
getChildReferences
Description copied from interface:StateMachineContext
Gets the child context references if any.- Specified by:
getChildReferences
in interfaceStateMachineContext<S,
E> - Returns:
- the child context references
-
getState
Description copied from interface:StateMachineContext
Gets the state.- Specified by:
getState
in interfaceStateMachineContext<S,
E> - Returns:
- the state
-
getHistoryStates
Description copied from interface:StateMachineContext
Gets the history state mappings- Specified by:
getHistoryStates
in interfaceStateMachineContext<S,
E> - Returns:
- the history state mappings
-
getEvent
Description copied from interface:StateMachineContext
Gets the event.- Specified by:
getEvent
in interfaceStateMachineContext<S,
E> - Returns:
- the event
-
getEventHeaders
Description copied from interface:StateMachineContext
Gets the event headers.- Specified by:
getEventHeaders
in interfaceStateMachineContext<S,
E> - Returns:
- the event headers
-
getExtendedState
Description copied from interface:StateMachineContext
Gets the extended state.- Specified by:
getExtendedState
in interfaceStateMachineContext<S,
E> - Returns:
- the extended state
-
hashCode
public int hashCode() -
equals
-
toString
-