public class GenericSagaFactory extends Object implements SagaFactory
resource
injector.| Constructor and Description |
|---|
GenericSagaFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Saga> |
createSaga(Class<T> sagaType)
Create a new instance of a Saga of given type.
|
void |
setResourceInjector(ResourceInjector resourceInjector)
Sets the resource injector that provides the resources needed by the Sagas created by this factory.
|
boolean |
supports(Class<? extends Saga> sagaType)
Indicates whether or not this factory can create instances of the given
sagaType. |
public <T extends Saga> T createSaga(Class<T> sagaType)
SagaFactorycreateSaga in interface SagaFactoryT - The type of saga to create an instance forsagaType - The type of saga to create an instance forpublic boolean supports(Class<? extends Saga> sagaType)
sagaType.
This implementation returns true for all types that have an accessible no-args constructor.supports in interface SagaFactorysagaType - The type of Sagatrue if this factory can create instance of the given sagaType,
false otherwise.public void setResourceInjector(ResourceInjector resourceInjector)
resourceInjector - The resource injector providing the necessary resourcesCopyright © 2010-2014. All Rights Reserved.