Class MethodKafkaListenerEndpoint<K,​V>

  • Type Parameters:
    K - the key type.
    V - the value type.
    All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, KafkaListenerEndpoint
    Direct Known Subclasses:
    MultiMethodKafkaListenerEndpoint

    public class MethodKafkaListenerEndpoint<K,​V>
    extends AbstractKafkaListenerEndpoint<K,​V>
    A KafkaListenerEndpoint providing the method to invoke to process an incoming message for this endpoint.
    Author:
    Stephane Nicoll, Artem Bilan, Gary Russell, Venil Noronha
    • Constructor Detail

      • MethodKafkaListenerEndpoint

        public MethodKafkaListenerEndpoint()
    • Method Detail

      • setBean

        public void setBean​(java.lang.Object bean)
        Set the object instance that should manage this endpoint.
        Parameters:
        bean - the target bean instance.
      • getBean

        public java.lang.Object getBean()
      • setMethod

        public void setMethod​(java.lang.reflect.Method method)
        Set the method to invoke to process a message managed by this endpoint.
        Parameters:
        method - the target method for the bean.
      • getMethod

        public java.lang.reflect.Method getMethod()
      • setMessageHandlerMethodFactory

        public void setMessageHandlerMethodFactory​(org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory messageHandlerMethodFactory)
        Set the MessageHandlerMethodFactory to use to build the InvocableHandlerMethod responsible to manage the invocation of this endpoint.
        Parameters:
        messageHandlerMethodFactory - the MessageHandlerMethodFactory instance.
      • getMessageHandlerMethodFactory

        protected org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory getMessageHandlerMethodFactory()
        Return the MessageHandlerMethodFactory.
        Returns:
        the messageHandlerMethodFactory