|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.saga.AbstractReplayAwareSagaManager org.axonframework.saga.AbstractSagaManager org.axonframework.saga.annotation.AnnotatedSagaManager
public class AnnotatedSagaManager
Implementation of the SagaManager that uses annotations on the Sagas to describe the lifecycle management. Unlike the SimpleSagaManager, this implementation can manage several types of Saga in a single AnnotatedSagaManager.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.axonframework.saga.AbstractSagaManager |
---|
commit, getManagedSagaTypes, handle, setCorrelationDataProvider, setCorrelationDataProviders, setSuppressExceptions, setSynchronizeSagaAccess, subscribe, unsubscribe |
Methods inherited from class org.axonframework.saga.AbstractReplayAwareSagaManager |
---|
afterReplay, beforeReplay, onReplayFailed, setReplayable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@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 manageMethod Detail |
---|
protected 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 instances
protected 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 information
protected void preProcessSaga(Saga saga)
AbstractSagaManager
preProcessSaga
in class AbstractSagaManager
saga
- The saga instance for pre-processingpublic Class<?> getTargetType()
EventListenerProxy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |