Interface StreamListenerSetupMethodOrchestrator
public interface StreamListenerSetupMethodOrchestrator
Orchestrator used for invoking the
StreamListener setup method.
By default StreamListenerAnnotationBeanPostProcessor will use an internal
implementation of this interface to invoke StreamListenerParameterAdapters and
StreamListenerResultAdapters or handler mappings on the method annotated with
StreamListener.
By providing a different implementation of this interface and registering it as a
Spring Bean in the context, one can override the default invocation strategies used by
the StreamListenerAnnotationBeanPostProcessor. A typical usecase for such
overriding can happen when a downstream
Binder implementation wants to change
the way in which any of the default StreamListener handling needs to be changed in a
custom manner.
When beans of this interface are present in the context, they get priority in the
StreamListenerAnnotationBeanPostProcessor before falling back to the default
implementation.- Author:
- Soby Chacko
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object[]adaptAndRetrieveInboundArguments(Method method, String inboundName, org.springframework.context.ApplicationContext applicationContext, StreamListenerParameterAdapter... streamListenerParameterAdapters) Default implementation for adapting each of the incoming method arguments using an availableStreamListenerParameterAdapterand provide the adapted collection of arguments back to the caller.voidorchestrateStreamListenerSetupMethod(StreamListener streamListener, Method method, Object bean) Method that allows custom orchestration on theStreamListenersetup method.booleanChecks the method annotated withStreamListenerto see if this implementation can successfully orchestrate this method.
-
Method Details
-
supports
Checks the method annotated withStreamListenerto see if this implementation can successfully orchestrate this method.- Parameters:
method- annotated withStreamListener- Returns:
- true if this implementation can orchestrate this method, false otherwise
-
orchestrateStreamListenerSetupMethod
void orchestrateStreamListenerSetupMethod(StreamListener streamListener, Method method, Object bean) Method that allows custom orchestration on theStreamListenersetup method.- Parameters:
streamListener- reference to theStreamListenerannotation on the methodmethod- annotated withStreamListenerbean- that contains the StreamListener method
-
adaptAndRetrieveInboundArguments
default Object[] adaptAndRetrieveInboundArguments(Method method, String inboundName, org.springframework.context.ApplicationContext applicationContext, StreamListenerParameterAdapter... streamListenerParameterAdapters) Default implementation for adapting each of the incoming method arguments using an availableStreamListenerParameterAdapterand provide the adapted collection of arguments back to the caller.- Parameters:
method- annotated withStreamListenerinboundName- inbound bindingapplicationContext- spring application contextstreamListenerParameterAdapters- used for adapting the method arguments- Returns:
- adapted incoming arguments
-