Class AbstractPulsarReaderContainerFactory<C extends AbstractPulsarMessageReaderContainer<T>,T>
java.lang.Object
org.springframework.pulsar.config.AbstractPulsarReaderContainerFactory<C,T>
- Type Parameters:
C
- theAbstractPulsarMessageReaderContainer
implementation type.T
- Message payload type.
- All Implemented Interfaces:
Aware
,ApplicationContextAware
,ApplicationEventPublisherAware
,PulsarContainerFactory<PulsarMessageReaderContainer,
,PulsarReaderEndpoint<PulsarMessageReaderContainer>> PulsarReaderContainerFactory
,ReaderContainerFactory<PulsarMessageReaderContainer,
PulsarReaderEndpoint<PulsarMessageReaderContainer>>
- Direct Known Subclasses:
DefaultPulsarReaderContainerFactory
public abstract class AbstractPulsarReaderContainerFactory<C extends AbstractPulsarMessageReaderContainer<T>,T>
extends Object
implements PulsarReaderContainerFactory, ApplicationEventPublisherAware, ApplicationContextAware
Base
PulsarReaderContainerFactory
implementation.- Author:
- Soby Chacko
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPulsarReaderContainerFactory
(PulsarReaderFactory<? super T> readerFactory, PulsarReaderContainerProperties containerProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract C
Create a message listener container for the given endpoint.protected PulsarReaderFactory<? super T>
protected void
initializeContainer
(C instance, PulsarReaderEndpoint<PulsarMessageReaderContainer> endpoint) void
setApplicationContext
(ApplicationContext applicationContext) void
setApplicationEventPublisher
(ApplicationEventPublisher applicationEventPublisher) void
setAutoStartup
(Boolean autoStartup) 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.PulsarContainerFactory
createContainer
Methods inherited from interface org.springframework.pulsar.config.ReaderContainerFactory
createReaderContainer, createReaderContainer
-
Field Details
-
logger
-
-
Constructor Details
-
AbstractPulsarReaderContainerFactory
protected AbstractPulsarReaderContainerFactory(PulsarReaderFactory<? super T> readerFactory, PulsarReaderContainerProperties containerProperties)
-
-
Method Details
-
getReaderFactory
-
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.
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-
createRegisteredContainer
Description copied from interface:PulsarContainerFactory
Create a message listener container for the given endpoint. Containers created using this method are added to the listener endpoint registry.- Specified by:
createRegisteredContainer
in interfacePulsarContainerFactory<C extends AbstractPulsarMessageReaderContainer<T>,
T> - Parameters:
endpoint
- the endpoint to configure- Returns:
- the created container
-
createContainerInstance
protected abstract C createContainerInstance(PulsarReaderEndpoint<PulsarMessageReaderContainer> endpoint) -
initializeContainer
protected void initializeContainer(C instance, PulsarReaderEndpoint<PulsarMessageReaderContainer> endpoint)
-