S
- the type of stateE
- the type of eventpublic interface Region<S,E> extends StateMachineReactiveLifecycle
Modifier and Type | Method and Description |
---|---|
void |
addStateListener(StateMachineListener<S,E> listener)
Adds the state listener.
|
java.lang.String |
getId()
Gets the region and state machine id.
|
State<S,E> |
getState()
Gets the current
State . |
java.util.Collection<State<S,E>> |
getStates()
Gets the
State s defined in this region. |
java.util.Collection<Transition<S,E>> |
getTransitions()
Gets a
Transition s for this region. |
java.util.UUID |
getUuid()
Gets the region and state machine unique id.
|
boolean |
isComplete()
Checks if region complete.
|
void |
removeStateListener(StateMachineListener<S,E> listener)
Removes the state listener.
|
boolean |
sendEvent(E event)
Deprecated.
in favor of
sendEvent(Mono) |
boolean |
sendEvent(org.springframework.messaging.Message<E> event)
Deprecated.
in favor of
sendEvent(Mono) |
reactor.core.publisher.Flux<StateMachineEventResult<S,E>> |
sendEvent(reactor.core.publisher.Mono<org.springframework.messaging.Message<E>> event)
|
reactor.core.publisher.Mono<java.util.List<StateMachineEventResult<S,E>>> |
sendEventCollect(reactor.core.publisher.Mono<org.springframework.messaging.Message<E>> event)
|
reactor.core.publisher.Flux<StateMachineEventResult<S,E>> |
sendEvents(reactor.core.publisher.Flux<org.springframework.messaging.Message<E>> events)
|
void |
start()
Deprecated.
in favor of
StateMachineReactiveLifecycle.startReactively() |
void |
stop()
Deprecated.
in favor of
StateMachineReactiveLifecycle.stopReactively() |
startReactively, stopReactively
java.util.UUID getUuid()
java.lang.String getId()
@Deprecated void start()
StateMachineReactiveLifecycle.startReactively()
@Deprecated void stop()
StateMachineReactiveLifecycle.stopReactively()
@Deprecated boolean sendEvent(org.springframework.messaging.Message<E> event)
sendEvent(Mono)
E
wrapped with a Message
to the region.
NOTE: this method is now deprecated in favour of a reactive methods.
event
- the wrapped event to send@Deprecated boolean sendEvent(E event)
sendEvent(Mono)
E
to the region.
NOTE: this method is now deprecated in favour of a reactive methods.
event
- the event to sendreactor.core.publisher.Flux<StateMachineEventResult<S,E>> sendEvents(reactor.core.publisher.Flux<org.springframework.messaging.Message<E>> events)
Flux
of events and return a Flux
of
StateMachineEventResult
s. Events are consumed after returned results
are consumed.events
- the eventsreactor.core.publisher.Flux<StateMachineEventResult<S,E>> sendEvent(reactor.core.publisher.Mono<org.springframework.messaging.Message<E>> event)
Mono
of event and return a Flux
of
StateMachineEventResult
s. Events are consumed after returned results
are consumed.event
- the eventreactor.core.publisher.Mono<java.util.List<StateMachineEventResult<S,E>>> sendEventCollect(reactor.core.publisher.Mono<org.springframework.messaging.Message<E>> event)
Mono
of event and return a Mono
of collected
StateMachineEventResult
s as a list. Events are consumed after
returned results are consumed.event
- the eventjava.util.Collection<State<S,E>> getStates()
State
s defined in this region. Returned collection is
an unmodifiable copy because states in a state machine are immutable.java.util.Collection<Transition<S,E>> getTransitions()
Transition
s for this region.boolean isComplete()
void addStateListener(StateMachineListener<S,E> listener)
listener
- the listenervoid removeStateListener(StateMachineListener<S,E> listener)
listener
- the listener