|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.saga.annotation.SagaMethodMessageHandlerInspector<T>
T
- The type of saga targeted by this inspectorpublic class SagaMethodMessageHandlerInspector<T extends AbstractAnnotatedSaga>
Utility class that inspects annotation on a Saga instance and returns the relevant configuration for its Event Handlers.
Constructor Summary | |
---|---|
protected |
SagaMethodMessageHandlerInspector(Class<T> sagaType,
ParameterResolverFactory parameterResolverFactory)
Initialize the inspector to handle events for the given sagaType . |
Method Summary | ||
---|---|---|
SagaMethodMessageHandler |
findHandlerMethod(AbstractAnnotatedSaga target,
EventMessage event)
Finds the handler method on given target for the given event . |
|
static
|
getInstance(Class<T> sagaType,
ParameterResolverFactory parameterResolverFactory)
Returns a SagaMethodMessageHandlerInspector for the given sagaType . |
|
List<SagaMethodMessageHandler> |
getMessageHandlers(EventMessage event)
Find the configuration for the handlers for the given event . |
|
ParameterResolverFactory |
getParameterResolverFactory()
Returns the ParameterResolverFactory used by this inspector to resolve values for handler parameters |
|
Class<T> |
getSagaType()
Returns the type of saga this inspector handles. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SagaMethodMessageHandlerInspector(Class<T> sagaType, ParameterResolverFactory parameterResolverFactory)
sagaType
.
sagaType
- The type of saga this inspector handlesparameterResolverFactory
- The factory for parameter resolvers that resolve parameters for the annotated
methodsMethod Detail |
---|
public static <T extends AbstractAnnotatedSaga> SagaMethodMessageHandlerInspector<T> getInstance(Class<T> sagaType, ParameterResolverFactory parameterResolverFactory)
sagaType
. The inspector provides
information about @SagaEventHandler annotated handler methods.
T
- The type of Saga to get the inspector forsagaType
- The type of Saga to get the inspector forparameterResolverFactory
- The factory for parameter resolvers that resolve parameters for the annotated
methods
public List<SagaMethodMessageHandler> getMessageHandlers(EventMessage event)
event
. If no suitable handler is found, an
empty list is returned.
The handlers are returned in the order they should be inspected to match against the association value. The
first handler in the list to match an association value of the Saga instance should be used to invoke that saga.
event
- The Event to investigate the handler for
public SagaMethodMessageHandler findHandlerMethod(AbstractAnnotatedSaga target, EventMessage event)
target
for the given event
.
target
- The instance to find a handler method onevent
- The event to find a handler for
public Class<T> getSagaType()
public ParameterResolverFactory getParameterResolverFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |