public class AnnotatedSagaManager extends AbstractSagaManager
Constructor and Description |
---|
AnnotatedSagaManager(SagaRepository sagaRepository,
EventBus eventBus,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Initialize the AnnotatedSagaManager using the given resources, and using a
GenericSagaFactory . |
AnnotatedSagaManager(SagaRepository sagaRepository,
SagaFactory sagaFactory,
EventBus eventBus,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Initialize the AnnotatedSagaManager using the given resources.
|
Modifier and Type | Method and Description |
---|---|
protected AssociationValue |
extractAssociationValue(Class<? extends Saga> sagaType,
EventMessage event)
Extracts the AssociationValue from the given
event as relevant for a Saga of given
sagaType . |
protected SagaCreationPolicy |
getSagaCreationPolicy(Class<? extends Saga> sagaType,
EventMessage event)
Returns the Saga Creation Policy for a Saga of the given
sagaType and event . |
Class<?> |
getTargetType()
Returns the instance type that this proxy delegates all event handling to.
|
commit, handle, setSuppressExceptions, setSynchronizeSagaAccess, subscribe, unsubscribe
public AnnotatedSagaManager(SagaRepository sagaRepository, EventBus eventBus, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
GenericSagaFactory
.sagaRepository
- The repository providing access to the Saga instanceseventBus
- The event bus publishing the eventssagaClasses
- The types of Saga that this instance should managepublic AnnotatedSagaManager(SagaRepository sagaRepository, SagaFactory sagaFactory, EventBus eventBus, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
sagaRepository
- The repository providing access to the Saga instancessagaFactory
- The factory creating new instances of a SagaeventBus
- The event bus publishing the eventssagaClasses
- The types of Saga that this instance should manageprotected SagaCreationPolicy getSagaCreationPolicy(Class<? extends Saga> sagaType, EventMessage event)
AbstractSagaManager
sagaType
and event
.getSagaCreationPolicy
in class AbstractSagaManager
sagaType
- The type of Saga to get the creation policy forevent
- The Event that is being dispatched to Saga instancesprotected AssociationValue extractAssociationValue(Class<? extends Saga> sagaType, EventMessage event)
AbstractSagaManager
event
as relevant for a Saga of given
sagaType
.extractAssociationValue
in class AbstractSagaManager
sagaType
- The type of Saga about to handle the Eventevent
- The event containing the association informationpublic Class<?> getTargetType()
EventListenerProxy
Copyright © 2010-2013. All Rights Reserved.