|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.saga.AbstractSagaManager
org.axonframework.saga.SimpleSagaManager
public class SimpleSagaManager
Simple SagaManager implementation. This implementation requires the Event that should cause new Saga's to be created,
to be registered using setEventsToAlwaysCreateNewSagasFor(java.util.List) and setEventsToOptionallyCreateNewSagasFor(java.util.List).
| Constructor Summary | |
|---|---|
SimpleSagaManager(Class<? extends Saga> sagaType,
SagaRepository sagaRepository,
AssociationValueResolver associationValueResolver,
EventBus eventBus)
Initialize a SimpleSagaManager backed by the given resources, using a GenericSagaFactory. |
|
SimpleSagaManager(Class<? extends Saga> sagaType,
SagaRepository sagaRepository,
AssociationValueResolver associationValueResolver,
SagaFactory sagaFactory,
EventBus eventBus)
Initialize a SimpleSagaManager backed by the given resources. |
|
| Method Summary | |
|---|---|
protected Set<Saga> |
findSagas(Event event)
Finds the saga instances that the given event needs to be routed to. |
void |
setEventsToAlwaysCreateNewSagasFor(List<Class<? extends Event>> events)
Sets the types of Events that should cause the creation of a new Saga instance, even if one already exists. |
void |
setEventsToOptionallyCreateNewSagasFor(List<Class<? extends Event>> events)
Sets the types of Events that should cause the creation of a new Saga instance if one does not already exist. |
| Methods inherited from class org.axonframework.saga.AbstractSagaManager |
|---|
commit, createSaga, getEventBus, getSagaRepository, handle, setSuppressExceptions, setSynchronizeSagaAccess, subscribe, unsubscribe |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleSagaManager(Class<? extends Saga> sagaType,
SagaRepository sagaRepository,
AssociationValueResolver associationValueResolver,
SagaFactory sagaFactory,
EventBus eventBus)
sagaType - The type of Saga managed by this SagaManagersagaRepository - The repository providing access to Saga instancesassociationValueResolver - The instance providing AssociationValues for incoming EventssagaFactory - The factory creating new Saga instanceseventBus - The event bus that the manager should register to
public SimpleSagaManager(Class<? extends Saga> sagaType,
SagaRepository sagaRepository,
AssociationValueResolver associationValueResolver,
EventBus eventBus)
sagaType - The type of Saga managed by this SagaManagersagaRepository - The repository providing access to Saga instancesassociationValueResolver - The instance providing AssociationValues for incoming EventseventBus - The event bus that the manager should register to| Method Detail |
|---|
protected Set<Saga> findSagas(Event event)
AbstractSagaManagerevent needs to be routed to. The event is sent to each of
the returned instances.
findSagas in class AbstractSagaManagerevent - The event to find relevant Sagas for
public void setEventsToAlwaysCreateNewSagasFor(List<Class<? extends Event>> events)
events - the types of Events that should cause the creation of a new Saga instance, even if one already
existspublic void setEventsToOptionallyCreateNewSagasFor(List<Class<? extends Event>> events)
events - the types of Events that should cause the creation of a new Saga instance if one does not already
exist
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||