public interface Saga<T> extends EventListener
"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.
|
TrackingToken |
trackingToken()
Returns the TrackingToken belonging to the EventMessage last processed by this instance, or
null if
this instance never handled an EventMessage, or if it received an EventMessage that doesn't carry a
TrackingToken. |
canHandle, handleString 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.TrackingToken trackingToken()
null if
this instance never handled an EventMessage, or if it received an EventMessage that doesn't carry a
TrackingToken.default boolean supportsReset()
EventListenersupportsReset in interface EventListenertrue if a reset is supported, otherwise falsedefault void prepareReset()
EventListenerprepareReset in interface EventListenerCopyright © 2010–2018. All rights reserved.