public class AnnotatedSagaManager extends AbstractSagaManager
Constructor and Description |
---|
AnnotatedSagaManager(SagaRepository sagaRepository,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Initialize the AnnotatedSagaManager using given
repository to load sagas and supporting given
annotated sagaClasses . |
AnnotatedSagaManager(SagaRepository sagaRepository,
EventBus eventBus,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Deprecated.
use
AnnotatedSagaManager(org.axonframework.saga.SagaRepository,
Class[]) instead and register this instance using EventBus.subscribe(org.axonframework.eventhandling.EventListener) |
AnnotatedSagaManager(SagaRepository sagaRepository,
ParameterResolverFactory parameterResolverFactory,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Initialize the AnnotatedSagaManager using given
repository to load sagas and supporting given
annotated sagaClasses . |
AnnotatedSagaManager(SagaRepository sagaRepository,
SagaFactory sagaFactory,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Initialize the AnnotatedSagaManager using the given resources.
|
AnnotatedSagaManager(SagaRepository sagaRepository,
SagaFactory sagaFactory,
EventBus eventBus,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Deprecated.
use
AnnotatedSagaManager(org.axonframework.saga.SagaRepository,
org.axonframework.saga.SagaFactory, Class[]) instead and register this instance using EventBus.subscribe(org.axonframework.eventhandling.EventListener) |
AnnotatedSagaManager(SagaRepository sagaRepository,
SagaFactory sagaFactory,
ParameterResolverFactory parameterResolverFactory,
Class<? extends AbstractAnnotatedSaga>... sagaClasses)
Initialize the AnnotatedSagaManager using the given resources.
|
Modifier and Type | Method and Description |
---|---|
protected Set<AssociationValue> |
extractAssociationValues(Class<? extends Saga> sagaType,
EventMessage event)
Extracts the AssociationValues from the given
event as relevant for a Saga of given
sagaType . |
protected SagaInitializationPolicy |
getSagaCreationPolicy(Class<? extends Saga> sagaType,
EventMessage event)
Returns the Saga Initialization Policy for a Saga of the given
sagaType and event . |
Class<?> |
getTargetType()
Returns the instance type that this proxy delegates all event handling to.
|
protected void |
preProcessSaga(Saga saga)
Perform pre-processing of sagas that have been newly created or have been loaded from the repository.
|
commit, getManagedSagaTypes, handle, setCorrelationDataProvider, setCorrelationDataProviders, setSuppressExceptions, setSynchronizeSagaAccess, subscribe, unsubscribe
@Deprecated public AnnotatedSagaManager(SagaRepository sagaRepository, EventBus eventBus, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
AnnotatedSagaManager(org.axonframework.saga.SagaRepository,
Class[])
instead and register this instance using EventBus.subscribe(org.axonframework.eventhandling.EventListener)
GenericSagaFactory
.sagaRepository
- The repository providing access to the Saga instanceseventBus
- The event bus publishing the eventssagaClasses
- The types of Saga that this instance should manage@Deprecated public AnnotatedSagaManager(SagaRepository sagaRepository, SagaFactory sagaFactory, EventBus eventBus, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
AnnotatedSagaManager(org.axonframework.saga.SagaRepository,
org.axonframework.saga.SagaFactory, Class[])
instead and register this instance using EventBus.subscribe(org.axonframework.eventhandling.EventListener)
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 managepublic AnnotatedSagaManager(SagaRepository sagaRepository, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
repository
to load sagas and supporting given
annotated sagaClasses
.sagaRepository
- The repository providing access to the Saga instancessagaClasses
- The types of Saga that this instance should managepublic AnnotatedSagaManager(SagaRepository sagaRepository, ParameterResolverFactory parameterResolverFactory, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
repository
to load sagas and supporting given
annotated sagaClasses
.sagaRepository
- The repository providing access to the Saga instancesparameterResolverFactory
- The parameterResolverFactory to resolve parameters with for the saga instance's
handler methodssagaClasses
- The types of Saga that this instance should managepublic AnnotatedSagaManager(SagaRepository sagaRepository, SagaFactory sagaFactory, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
sagaRepository
- The repository providing access to the Saga instancessagaFactory
- The factory creating new instances of a SagasagaClasses
- The types of Saga that this instance should managepublic AnnotatedSagaManager(SagaRepository sagaRepository, SagaFactory sagaFactory, ParameterResolverFactory parameterResolverFactory, Class<? extends AbstractAnnotatedSaga>... sagaClasses)
sagaRepository
- The repository providing access to the Saga instancessagaFactory
- The factory creating new instances of a SagaparameterResolverFactory
- The parameterResolverFactory to resolve parameters with for the saga instance's
handler methodssagaClasses
- The types of Saga that this instance should manageprotected SagaInitializationPolicy getSagaCreationPolicy(Class<? extends Saga> sagaType, EventMessage event)
AbstractSagaManager
sagaType
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
sagaType
- The type of Saga to get the creation policy forevent
- The Event that is being dispatched to Saga instancesprotected Set<AssociationValue> extractAssociationValues(Class<? extends Saga> sagaType, EventMessage event)
AbstractSagaManager
event
as relevant for a Saga of given
sagaType
. A single event may be associated with multiple values.extractAssociationValues
in class AbstractSagaManager
sagaType
- The type of Saga about to handle the Eventevent
- The event containing the association informationprotected void preProcessSaga(Saga saga)
AbstractSagaManager
preProcessSaga
in class AbstractSagaManager
saga
- The saga instance for pre-processingpublic Class<?> getTargetType()
EventListenerProxy
Copyright © 2010-2014. All Rights Reserved.