org.axonframework.saga
Interface SagaFactory

All Known Implementing Classes:
GenericSagaFactory

public interface SagaFactory

Interface describing a mechanism that creates implementations of a Saga.

Since:
0.7
Author:
Allard Buijze

Method Summary
<T extends Saga>
T
createSaga(Class<T> sagaType)
          Create a new instance of a Saga of given type.
 boolean supports(Class<? extends Saga> sagaType)
          Indicates whether or not this factory can create instances of the given sagaType.
 

Method Detail

createSaga

<T extends Saga> T createSaga(Class<T> sagaType)
Create a new instance of a Saga of given type. The Saga must be fully initialized and resources it depends on must have been provided (injected or otherwise).

Type Parameters:
T - The type of saga to create an instance for
Parameters:
sagaType - The type of saga to create an instance for
Returns:
A fully initialized instance of a saga of given type

supports

boolean supports(Class<? extends Saga> sagaType)
Indicates whether or not this factory can create instances of the given sagaType.

Parameters:
sagaType - The type of Saga
Returns:
true if this factory can create instance of the given sagaType, false otherwise.


Copyright © 2010-2016. All Rights Reserved.