Package org.springframework.statemachine
Interface StateMachineEventResult<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Known Implementing Classes:
StateMachineEventResult.DefaultStateMachineEventResult
public interface StateMachineEventResult<S,E>
Interface defining a result for sending an event to a statemachine.
- Author:
- Janne Valkealahti
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static enum
Enumeration of a result type indicating whether a region accepted, denied or deferred an event. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
complete()
Gets a mono representing completion.static <S,
E> StateMachineEventResult<S, E> from
(Region<S, E> region, org.springframework.messaging.Message<E> message, StateMachineEventResult.ResultType resultType) static <S,
E> StateMachineEventResult<S, E> from
(Region<S, E> region, org.springframework.messaging.Message<E> message, StateMachineEventResult.ResultType resultType, reactor.core.publisher.Mono<Void> complete) Create aStateMachineEventResult
from aRegion
,Message
, aStateMachineEventResult.ResultType
and completionMono
.org.springframework.messaging.Message<E>
Gets the message.Gets the region.Gets the result type.
-
Method Details
-
getRegion
Gets the region.- Returns:
- the region
-
getMessage
org.springframework.messaging.Message<E> getMessage()Gets the message.- Returns:
- the message
-
getResultType
StateMachineEventResult.ResultType getResultType()Gets the result type.- Returns:
- the result type
-
complete
reactor.core.publisher.Mono<Void> complete()Gets a mono representing completion. Will have exception in a normal reactive chain if there is one.- Returns:
- the mono for completion
-
from
static <S,E> StateMachineEventResult<S,E> from(Region<S, E> region, org.springframework.messaging.Message<E> message, StateMachineEventResult.ResultType resultType) - Type Parameters:
S
- the type of stateE
- the type of event- Parameters:
region
- the regionmessage
- the messageresultType
- the result type- Returns:
- the state machine event result
-
from
static <S,E> StateMachineEventResult<S,E> from(Region<S, E> region, org.springframework.messaging.Message<E> message, StateMachineEventResult.ResultType resultType, reactor.core.publisher.Mono<Void> complete) Create aStateMachineEventResult
from aRegion
,Message
, aStateMachineEventResult.ResultType
and completionMono
.- Type Parameters:
S
- the type of stateE
- the type of event- Parameters:
region
- the regionmessage
- the messageresultType
- the result typecomplete
- the completion mono- Returns:
- the state machine event result
-