Class AbstractPulsarListenerContainerFactory<C extends AbstractPulsarMessageListenerContainer<T>,T>
java.lang.Object
org.springframework.pulsar.config.AbstractPulsarListenerContainerFactory<C,T>
- Type Parameters:
C- theAbstractPulsarMessageListenerContainerimplementation type.T- Message payload type.
- All Implemented Interfaces:
Aware,ApplicationContextAware,ApplicationEventPublisherAware,ListenerContainerFactory<PulsarMessageListenerContainer,,PulsarListenerEndpoint> PulsarListenerContainerFactory
- Direct Known Subclasses:
ConcurrentPulsarListenerContainerFactory
public abstract class AbstractPulsarListenerContainerFactory<C extends AbstractPulsarMessageListenerContainer<T>,T>
extends Object
implements PulsarListenerContainerFactory, ApplicationEventPublisherAware, ApplicationContextAware
Base
PulsarListenerContainerFactory implementation.- Author:
- Soby Chacko, Chris Bono
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPulsarListenerContainerFactory(PulsarConsumerFactory<? super T> consumerFactory, PulsarContainerProperties containerProperties, io.micrometer.observation.ObservationRegistry observationRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CCreate aMessageListenerContainerfor the givenListenerEndpoint.protected PulsarConsumerFactory<? super T>protected io.micrometer.observation.ObservationRegistryprotected voidinitializeContainer(C instance, PulsarListenerEndpoint endpoint) voidsetApplicationContext(ApplicationContext applicationContext) voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetAutoStartup(Boolean autoStartup) voidsetBatchListener(Boolean batchListener) voidsetMessageConverter(MessageConverter messageConverter) Set the message converter to use if dynamic argument type matching is needed.voidsetPhase(int phase) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.pulsar.config.ListenerContainerFactory
createContainer
-
Field Details
-
logger
-
-
Constructor Details
-
AbstractPulsarListenerContainerFactory
protected AbstractPulsarListenerContainerFactory(PulsarConsumerFactory<? super T> consumerFactory, PulsarContainerProperties containerProperties, @Nullable io.micrometer.observation.ObservationRegistry observationRegistry)
-
-
Method Details
-
getConsumerFactory
-
getObservationRegistry
protected io.micrometer.observation.ObservationRegistry getObservationRegistry() -
getContainerProperties
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
setAutoStartup
-
setPhase
public void setPhase(int phase) -
setMessageConverter
Set the message converter to use if dynamic argument type matching is needed.- Parameters:
messageConverter- the converter.
-
setBatchListener
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-
createListenerContainer
Description copied from interface:ListenerContainerFactoryCreate aMessageListenerContainerfor the givenListenerEndpoint. Containers created using this method are added to the listener endpoint registry.- Specified by:
createListenerContainerin interfaceListenerContainerFactory<C extends AbstractPulsarMessageListenerContainer<T>,T> - Parameters:
endpoint- the endpoint to configure- Returns:
- the created container
-
createContainerInstance
-
initializeContainer
-