Class MultiMethodKafkaListenerEndpoint<K,V>
java.lang.Object
org.springframework.kafka.config.AbstractKafkaListenerEndpoint<K,V>
org.springframework.kafka.config.MethodKafkaListenerEndpoint<K,V>
org.springframework.kafka.config.MultiMethodKafkaListenerEndpoint<K,V>
- Type Parameters:
K- the key type.V- the value type.
- All Implemented Interfaces:
Aware,BeanFactoryAware,InitializingBean,KafkaListenerEndpoint
The
MethodKafkaListenerEndpoint extension for several POJO methods
based on the KafkaHandler.- Author:
- Gary Russell, Wang Zhiyang
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMultiMethodKafkaListenerEndpoint(List<Method> methods, @Nullable Method defaultMethod, Object bean) Construct an instance for the provided methods, default method and bean. -
Method Summary
Modifier and TypeMethodDescriptionprotected HandlerAdapterconfigureListenerAdapter(MessagingMessageListenerAdapter<K, V> messageListener) Create aHandlerAdapterfor this listener adapter.@Nullable MethodGet a default method.Get a method list.voidsetDefaultMethod(@Nullable Method defaultMethod) Set a default method.voidsetMethods(List<Method> methods) Set a method list.voidsetValidator(Validator validator) Set a payload validator.Methods inherited from class org.springframework.kafka.config.MethodKafkaListenerEndpoint
createMessageListener, createMessageListenerInstance, getBean, getEndpointDescription, getMessageHandlerMethodFactory, getMethod, setBean, setErrorHandler, setMessageHandlerMethodFactory, setMessagingConverter, setMethodMethods inherited from class org.springframework.kafka.config.AbstractKafkaListenerEndpoint
afterPropertiesSet, getAutoStartup, getBatchListener, getBatchToRecordAdapter, getBeanExpressionContext, getBeanFactory, getBeanResolver, getClientIdPrefix, getConcurrency, getConsumerProperties, getContainerPostProcessor, getGroup, getGroupId, getId, getListenerInfo, getMainListenerId, getRecordFilterStrategy, getReplyTemplate, getResolver, getTopicPartitionsToAssign, getTopicPattern, getTopics, isAckDiscarded, isBatchListener, isShareConsumer, isSplitIterables, setAckDiscarded, setAutoStartup, setBatchListener, setBatchToRecordAdapter, setBeanFactory, setClientIdPrefix, setConcurrency, setConsumerProperties, setContainerPostProcessor, setCorrelationHeaderName, setGroup, setGroupId, setId, setListenerInfo, setMainListenerId, setRecordFilterStrategy, setReplyHeadersConfigurer, setReplyTemplate, setShareConsumer, setSplitIterables, setTopicPartitions, setTopicPattern, setTopics, setupListenerContainer, toString
-
Constructor Details
-
MultiMethodKafkaListenerEndpoint
-
-
Method Details
-
getMethods
-
setMethods
-
getDefaultMethod
Get a default method.- Returns:
- the default method.
- Since:
- 3.2
-
setDefaultMethod
Set a default method.- Parameters:
defaultMethod- the default method.- Since:
- 3.2
-
setValidator
Set a payload validator.- Parameters:
validator- the validator.- Since:
- 2.5.11
-
configureListenerAdapter
protected HandlerAdapter configureListenerAdapter(MessagingMessageListenerAdapter<K, V> messageListener) Description copied from class:MethodKafkaListenerEndpointCreate aHandlerAdapterfor this listener adapter.- Overrides:
configureListenerAdapterin classMethodKafkaListenerEndpoint<K,V> - Parameters:
messageListener- the listener adapter.- Returns:
- the handler adapter.
-