Class AbstractPulsarMessageReaderContainer<T>
java.lang.Object
org.springframework.pulsar.core.AbstractPulsarMessageContainer
org.springframework.pulsar.reader.AbstractPulsarMessageReaderContainer<T>
- Type Parameters:
T
- reader data type.
- All Implemented Interfaces:
Aware
,BeanNameAware
,DisposableBean
,ApplicationContextAware
,ApplicationEventPublisherAware
,Lifecycle
,Phased
,SmartLifecycle
,PulsarMessageReaderContainer
- Direct Known Subclasses:
DefaultPulsarMessageReaderContainer
public abstract non-sealed class AbstractPulsarMessageReaderContainer<T>
extends AbstractPulsarMessageContainer
implements PulsarMessageReaderContainer
Core implementation for
PulsarMessageReaderContainer
.- Author:
- Soby Chacko
-
Field Summary
Fields inherited from class org.springframework.pulsar.core.AbstractPulsarMessageContainer
autoStartup, logger, running
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPulsarMessageReaderContainer
(PulsarReaderFactory<? super T> pulsarReaderFactory, PulsarReaderContainerProperties pulsarReaderContainerProperties) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
setAutoStartup
(boolean autoStartup) void
setReaderCustomizer
(ReaderBuilderCustomizer<?> readerBuilderCustomizer) Set a reader customizer on this container.protected void
setRunning
(boolean running) void
setupReaderListener
(Object messageListener) final void
start()
void
stop()
Methods inherited from class org.springframework.pulsar.core.AbstractPulsarMessageContainer
doStart, doStop, getApplicationContext, getApplicationEventPublisher, getBeanName, getPhase, setApplicationContext, setApplicationEventPublisher, setBeanName, setPhase
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.reader.PulsarMessageReaderContainer
destroy
Methods inherited from interface org.springframework.context.SmartLifecycle
getPhase, stop
-
Field Details
-
lifecycleMonitor
-
readerBuilderCustomizer
-
-
Constructor Details
-
AbstractPulsarMessageReaderContainer
protected AbstractPulsarMessageReaderContainer(PulsarReaderFactory<? super T> pulsarReaderFactory, PulsarReaderContainerProperties pulsarReaderContainerProperties)
-
-
Method Details
-
getPulsarReaderFactory
-
getContainerProperties
- Specified by:
getContainerProperties
in interfacePulsarMessageReaderContainer
-
isRunning
public boolean isRunning() -
setRunning
protected void setRunning(boolean running) -
setupReaderListener
- Specified by:
setupReaderListener
in interfacePulsarMessageReaderContainer
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceSmartLifecycle
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) - Specified by:
setAutoStartup
in interfacePulsarMessageReaderContainer
-
start
public final void start() -
stop
public void stop() -
setReaderCustomizer
Description copied from interface:PulsarMessageReaderContainer
Set a reader customizer on this container.- Specified by:
setReaderCustomizer
in interfacePulsarMessageReaderContainer
- Parameters:
readerBuilderCustomizer
-ReaderBuilderCustomizer
-
getReaderBuilderCustomizer
-