Class StateData<S,E>
java.lang.Object
org.springframework.statemachine.config.model.StateData<S,E>
- Type Parameters:
S- the type of stateE- the type of event
StateData is a data representation of a State used as an
abstraction between a StateMachineFactory and a state machine
configuration.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new state data.StateData(Object parent, Object region, S state, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions) Instantiates a new state data.StateData(Object parent, Object region, S state, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, boolean initial) Instantiates a new state data.StateData(Object parent, Object region, S state, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, boolean initial, Action<S, E> initialAction) Instantiates a new state data.Instantiates a new state data.Instantiates a new state data. -
Method Summary
Modifier and TypeMethodDescriptionGets the deferred.Collection<Function<StateContext<S,E>, reactor.core.publisher.Mono<Void>>> Gets the entry actions.Collection<Function<StateContext<S,E>, reactor.core.publisher.Mono<Void>>> Gets the exit actions.Gets the parent.Gets the pseudo state kind.Gets the region.getState()Gets the state.Collection<Function<StateContext<S,E>, reactor.core.publisher.Mono<Void>>> Gets the state actions.Gets the submachine.Gets the submachine factory.Gets the submachine state data.booleanisEnd()Checks if is end.booleanChecks if is initial.voidsetDeferred(Collection<E> deferred) Sets the deferred.voidsetEnd(boolean end) Sets the end.voidsetEntryActions(Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions) Sets the entry actions.voidsetExitActions(Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions) Sets the exit actions.voidsetInitial(boolean initial) Sets the initial.voidsetInitialAction(Action<S, E> action) Sets the initial action.voidSets the parent.voidsetPseudoStateKind(PseudoStateKind pseudoStateKind) Sets the pseudo state kind.voidSets the region.voidsetStateActions(Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> stateActions) Sets the state actions.voidsetSubmachine(StateMachineFactory<S, E> submachineFactory) Sets the submachine factory.voidsetSubmachine(StateMachine<S, E> submachine) Sets the submachine.voidsetSubmachineFactory(StateMachineFactory<S, E> submachineFactory) Sets the submachine factory.voidsetSubmachineStateData(Collection<StateData<S, E>> submachineStateData) Sets the submachine state data.toString()
-
Constructor Details
-
StateData
Instantiates a new state data.- Parameters:
state- the state
-
StateData
Instantiates a new state data.- Parameters:
state- the stateinitial- the initial
-
StateData
Instantiates a new state data.- Parameters:
parent- the parentregion- the regionstate- the stateinitial- the initial
-
StateData
public StateData(Object parent, Object region, S state, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions) Instantiates a new state data.- Parameters:
parent- the parentregion- the regionstate- the statedeferred- the deferredentryActions- the entry actionsexitActions- the exit actions
-
StateData
public StateData(Object parent, Object region, S state, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, boolean initial) Instantiates a new state data.- Parameters:
parent- the parentregion- the regionstate- the statedeferred- the deferredentryActions- the entry actionsexitActions- the exit actionsinitial- the initial
-
StateData
public StateData(Object parent, Object region, S state, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, boolean initial, Action<S, E> initialAction) Instantiates a new state data.- Parameters:
parent- the parentregion- the regionstate- the statedeferred- the deferredentryActions- the entry actionsexitActions- the exit actionsinitial- the initialinitialAction- the initial action
-
-
Method Details
-
getState
Gets the state.- Returns:
- the state
-
getSubmachineStateData
Gets the submachine state data.- Returns:
- the submachine state data
-
setSubmachineStateData
Sets the submachine state data.- Parameters:
submachineStateData- the submachine state data
-
getSubmachine
Gets the submachine.- Returns:
- the submachine
-
setSubmachine
Sets the submachine.- Parameters:
submachine- the submachine
-
getSubmachineFactory
Gets the submachine factory.- Returns:
- the submachine factory
-
setSubmachineFactory
Sets the submachine factory.- Parameters:
submachineFactory- the submachine factory
-
setSubmachine
Sets the submachine factory.- Parameters:
submachineFactory- the submachine factory
-
getDeferred
Gets the deferred.- Returns:
- the deferred
-
setDeferred
Sets the deferred.- Parameters:
deferred- the new deferred
-
getEntryActions
Gets the entry actions.- Returns:
- the entry actions
-
setEntryActions
public void setEntryActions(Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions) Sets the entry actions.- Parameters:
entryActions- the entry actions
-
getExitActions
Gets the exit actions.- Returns:
- the exit actions
-
setExitActions
public void setExitActions(Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions) Sets the exit actions.- Parameters:
exitActions- the exit actions
-
getStateActions
Gets the state actions.- Returns:
- the state actions
-
setStateActions
public void setStateActions(Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> stateActions) Sets the state actions.- Parameters:
stateActions- the state actions
-
getParent
Gets the parent.- Returns:
- the parent
-
setParent
Sets the parent.- Parameters:
parent- the new parent
-
getRegion
Gets the region.- Returns:
- the region
-
setRegion
Sets the region.- Parameters:
region- the new region
-
isInitial
public boolean isInitial()Checks if is initial.- Returns:
- true, if is initial
-
setInitial
public void setInitial(boolean initial) Sets the initial.- Parameters:
initial- the new initial
-
setInitialAction
Sets the initial action.- Parameters:
action- the action
-
getInitialAction
-
isEnd
public boolean isEnd()Checks if is end.- Returns:
- true, if is end
-
setEnd
public void setEnd(boolean end) Sets the end.- Parameters:
end- the new end
-
getPseudoStateKind
Gets the pseudo state kind.- Returns:
- the pseudo state kind
-
setPseudoStateKind
Sets the pseudo state kind.- Parameters:
pseudoStateKind- the new pseudo state kind
-
toString
-