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 Details

    • supports

      boolean supports(Method method)
      Checks the method annotated with StreamListener to see if this implementation can successfully orchestrate this method.
      Parameters:
      method - annotated with StreamListener
      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 the StreamListener setup method.
      Parameters:
      streamListener - reference to the StreamListener annotation on the method
      method - annotated with StreamListener
      bean - 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 available StreamListenerParameterAdapter and provide the adapted collection of arguments back to the caller.
      Parameters:
      method - annotated with StreamListener
      inboundName - inbound binding
      applicationContext - spring application context
      streamListenerParameterAdapters - used for adapting the method arguments
      Returns:
      adapted incoming arguments