Package org.springframework.statemachine
Interface StateMachine<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Superinterfaces:
Region<S,
,E> StateMachineReactiveLifecycle
- All Known Implementing Classes:
AbstractStateMachine
,DistributedStateMachine
,ObjectStateMachine
StateMachine
provides an APIs for generic finite state machine needed
for basic operations like working with states, events and a lifecycle.- Author:
- Janne Valkealahti
-
Method Summary
Modifier and TypeMethodDescriptionGets the state machine extended state.Gets the initial stateS
.Gets the state machine accessor.boolean
Checks for state machine error.void
setStateMachineError
(Exception exception) Sets the state machine error.Methods inherited from interface org.springframework.statemachine.region.Region
addStateListener, getId, getState, getStates, getTransitions, getUuid, isComplete, removeStateListener, sendEvent, sendEvent, sendEvent, sendEventCollect, sendEvents, start, stop
Methods inherited from interface org.springframework.statemachine.support.StateMachineReactiveLifecycle
startReactively, stopReactively
-
Method Details
-
getInitialState
Gets the initial stateS
.- Returns:
- initial state
-
getExtendedState
ExtendedState getExtendedState()Gets the state machine extended state.- Returns:
- extended state
-
getStateMachineAccessor
StateMachineAccessor<S,E> getStateMachineAccessor()Gets the state machine accessor.- Returns:
- the state machine accessor
-
setStateMachineError
Sets the state machine error.- Parameters:
exception
- the new state machine error
-
hasStateMachineError
boolean hasStateMachineError()Checks for state machine error.- Returns:
- true, if error has been set
-