T - The type of Saga managed by this instancepublic class AnnotatedSagaManager<T> extends AbstractSagaManager<T>
| Constructor and Description |
|---|
AnnotatedSagaManager(Class<T> sagaType,
SagaRepository<T> sagaRepository)
Initialize the AnnotatedSagaManager using given
repository to load sagas. |
AnnotatedSagaManager(Class<T> sagaType,
SagaRepository<T> sagaRepository,
ParameterResolverFactory parameterResolverFactory)
Initialize the AnnotatedSagaManager using given
repository to load sagas. |
AnnotatedSagaManager(Class<T> sagaType,
SagaRepository<T> sagaRepository,
Supplier<T> sagaFactory)
Initialize the AnnotatedSagaManager using given
repository to load sagas and sagaFactory to
create new sagas. |
AnnotatedSagaManager(Class<T> sagaType,
SagaRepository<T> sagaRepository,
Supplier<T> sagaFactory,
SagaModel<T> sagaMetaModel)
Initialize the AnnotatedSagaManager using given
repository to load sagas, the sagaFactory to
create new sagas and the sagaMetaModel to delegate messages to the saga instances. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(EventMessage<?> eventMessage,
Segment segment)
Check whether or not this invoker has handlers that can handle the given
eventMessage for a given
segment. |
protected Set<AssociationValue> |
extractAssociationValues(EventMessage<?> event)
Extracts the AssociationValues from the given
event as relevant for a Saga of given
sagaType. |
protected SagaInitializationPolicy |
getSagaCreationPolicy(EventMessage<?> event)
Returns the Saga Initialization Policy for a Saga of the given
sagaType and event. |
createSagaIdentifier, getSagaType, handle, matchesSegment, setSuppressExceptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlepublic AnnotatedSagaManager(Class<T> sagaType, SagaRepository<T> sagaRepository)
repository to load sagas. To create a new saga this
manager uses newInstance(Class). Uses a AnnotationSagaMetaModelFactory for the saga's meta model.sagaType - the saga target typesagaRepository - The repository providing access to the Saga instancespublic AnnotatedSagaManager(Class<T> sagaType, SagaRepository<T> sagaRepository, ParameterResolverFactory parameterResolverFactory)
repository to load sagas. To create a new saga this
manager uses newInstance(Class). Uses a AnnotationSagaMetaModelFactory for the saga's meta model.sagaType - the saga target typesagaRepository - The repository providing access to the Saga instancesparameterResolverFactory - The ParameterResolverFactory instance to resolve parameter values for annotated
handlers withpublic AnnotatedSagaManager(Class<T> sagaType, SagaRepository<T> sagaRepository, Supplier<T> sagaFactory)
repository to load sagas and sagaFactory to
create new sagas. Uses a AnnotationSagaMetaModelFactory for the saga's meta model.sagaType - the saga target typesagaRepository - The repository providing access to the Saga instancessagaFactory - the factory for new saga instances of type Tpublic AnnotatedSagaManager(Class<T> sagaType, SagaRepository<T> sagaRepository, Supplier<T> sagaFactory, SagaModel<T> sagaMetaModel)
repository to load sagas, the sagaFactory to
create new sagas and the sagaMetaModel to delegate messages to the saga instances.sagaType - the saga target typesagaRepository - The repository providing access to the Saga instancessagaFactory - the factory for new saga instances of type TsagaMetaModel - the meta model to delegate messages to a saga instancepublic boolean canHandle(EventMessage<?> eventMessage, Segment segment)
EventHandlerInvokereventMessage for a given
segment.eventMessage - The message to be processedsegment - The segment for which the event handler should be invokedtrue if the invoker has one or more handlers that can handle the given message, false
otherwiseprotected SagaInitializationPolicy getSagaCreationPolicy(EventMessage<?> event)
AbstractSagaManagersagaType and event. This
policy provides the conditions to create new Saga instance, as well as the initial association of that saga.getSagaCreationPolicy in class AbstractSagaManager<T>event - The Event that is being dispatched to Saga instancesprotected Set<AssociationValue> extractAssociationValues(EventMessage<?> event)
AbstractSagaManagerevent as relevant for a Saga of given
sagaType. A single event may be associated with multiple values.extractAssociationValues in class AbstractSagaManager<T>event - The event containing the association informationCopyright © 2010–2017. All rights reserved.