Class AbstractPulsarListenerContainerFactory<C extends AbstractPulsarMessageListenerContainer<T>,T>
java.lang.Object
org.springframework.pulsar.config.AbstractPulsarListenerContainerFactory<C,T>
- Type Parameters:
C
- theAbstractPulsarMessageListenerContainer
implementation 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
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPulsarListenerContainerFactory
(PulsarConsumerFactory<? super T> consumerFactory, PulsarContainerProperties containerProperties, io.micrometer.observation.ObservationRegistry observationRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract C
Create aMessageListenerContainer
for the givenListenerEndpoint
.protected PulsarConsumerFactory<? super T>
protected io.micrometer.observation.ObservationRegistry
protected void
initializeContainer
(C instance, PulsarListenerEndpoint endpoint) void
setApplicationContext
(ApplicationContext applicationContext) void
setApplicationEventPublisher
(ApplicationEventPublisher applicationEventPublisher) void
setAutoStartup
(Boolean autoStartup) void
setBatchListener
(Boolean batchListener) void
setMessageConverter
(MessageConverter messageConverter) Set the message converter to use if dynamic argument type matching is needed.void
setPhase
(int phase) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setApplicationContext
in 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:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-
createListenerContainer
Description copied from interface:ListenerContainerFactory
Create aMessageListenerContainer
for the givenListenerEndpoint
. Containers created using this method are added to the listener endpoint registry.- Specified by:
createListenerContainer
in interfaceListenerContainerFactory<C extends AbstractPulsarMessageListenerContainer<T>,
T> - Parameters:
endpoint
- the endpoint to configure- Returns:
- the created container
-
createContainerInstance
-
initializeContainer
-