Interface StreamListenerSetupMethodOrchestrator
-
public interface StreamListenerSetupMethodOrchestratorOrchestrator used for invoking theStreamListenersetup method. By defaultStreamListenerAnnotationBeanPostProcessorwill use an internal implementation of this interface to invokeStreamListenerParameterAdapters andStreamListenerResultAdapters or handler mappings on the method annotated withStreamListener. 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 theStreamListenerAnnotationBeanPostProcessor. A typical usecase for such overriding can happen when a downstreamBinderimplementation 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 theStreamListenerAnnotationBeanPostProcessorbefore falling back to the default implementation.- Author:
- Soby Chacko
- See Also:
StreamListener,StreamListenerAnnotationBeanPostProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description 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.voidorchestrateStreamListenerSetupMethod(StreamListener streamListener, Method method, Object bean)Method that allows custom orchestration on theStreamListenersetup method.booleansupports(Method method)Checks the method annotated withStreamListenerto see if this implementation can successfully orchestrate this method.
-
-
-
Method Detail
-
supports
boolean supports(Method method)
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
-
-