T
- The type of saga targeted by this inspectorpublic class SagaMethodMessageHandlerInspector<T extends AbstractAnnotatedSaga> extends Object
Modifier | Constructor and Description |
---|---|
protected |
SagaMethodMessageHandlerInspector(Class<T> sagaType,
ParameterResolverFactory parameterResolverFactory)
Initialize the inspector to handle events for the given
sagaType . |
Modifier and Type | Method and Description |
---|---|
SagaMethodMessageHandler |
findHandlerMethod(AbstractAnnotatedSaga target,
EventMessage event)
Finds the handler method on given
target for the given event . |
static <T extends AbstractAnnotatedSaga> |
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.
|
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
methodspublic 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
methodspublic 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 forpublic 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 forpublic Class<T> getSagaType()
public ParameterResolverFactory getParameterResolverFactory()
Copyright © 2010-2014. All Rights Reserved.