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 invoker.
|
default boolean |
supportsReset()
Indicates whether the handlers managed by this invoker support a reset.
|
handlecanHandle, getTargetTypeString 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()
EventMessageHandlersupportsReset in interface EventMessageHandlertrue if a reset is supported, otherwise falsedefault void prepareReset()
EventMessageHandlerprepareReset in interface EventMessageHandlerCopyright © 2010–2018. All rights reserved.