public interface Saga<T> extends EventMessageHandler
"orderId"
and value "1234"
.Modifier and Type | Method and Description |
---|---|
void |
execute(Consumer<T> invocation)
Execute the given
invocation against the root object of this Saga instance. |
AssociationValues |
getAssociationValues()
Returns a view on the Association Values for this saga instance.
|
String |
getSagaIdentifier()
Returns the unique identifier of this saga.
|
<R> R |
invoke(Function<T,R> invocation)
Execute the given
invocation against the root object of this Saga instance. |
boolean |
isActive()
Indicates whether or not this saga is active.
|
default void |
prepareReset()
Performs any activities that are required to reset the state managed by handlers assigned to this handler.
|
default void |
prepareReset(Object resetContext)
Performs any activities that are required to reset the state managed by handlers assigned to this handler.
|
default boolean |
supportsReset()
Indicates whether the handlers managed by this invoker support a reset.
|
handle
canHandle, canHandleType, getTargetType
String getSagaIdentifier()
AssociationValues getAssociationValues()
<R> R invoke(Function<T,R> invocation)
invocation
against the root object of this Saga instance.R
- The type of return value expectedinvocation
- the function to invoke. The root object of the Saga is input to the function, the result is
the result of the execution.void execute(Consumer<T> invocation)
invocation
against the root object of this Saga instance.invocation
- the function to invoke. The root object of the Saga is input to the function.boolean isActive()
true
if this saga is active, false
otherwise.default boolean supportsReset()
EventMessageHandler
supportsReset
in interface EventMessageHandler
true
if a reset is supported, otherwise false
default void prepareReset()
EventMessageHandler
prepareReset
in interface EventMessageHandler
default void prepareReset(Object resetContext)
EventMessageHandler
prepareReset
in interface EventMessageHandler
resetContext
- a R
used to support the reset operationCopyright © 2010–2023. All rights reserved.