Package org.springframework.pulsar.core
Class AbstractPulsarMessageContainer
java.lang.Object
org.springframework.pulsar.core.AbstractPulsarMessageContainer
- All Implemented Interfaces:
Aware
,BeanNameAware
,DisposableBean
,ApplicationContextAware
,ApplicationEventPublisherAware
,Lifecycle
,Phased
,SmartLifecycle
- Direct Known Subclasses:
AbstractPulsarMessageListenerContainer
,AbstractPulsarMessageReaderContainer
public abstract class AbstractPulsarMessageContainer
extends Object
implements ApplicationEventPublisherAware, BeanNameAware, ApplicationContextAware, SmartLifecycle, DisposableBean
Base class for the various container implementations.
- Author:
- Soby Chacko
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doStart()
protected abstract void
doStop()
protected ApplicationContext
Get the event publisher.Return the bean name.int
getPhase()
void
setApplicationContext
(ApplicationContext applicationContext) void
setApplicationEventPublisher
(ApplicationEventPublisher applicationEventPublisher) void
setBeanName
(String name) 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.beans.factory.DisposableBean
destroy
Methods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Field Details
-
logger
-
autoStartup
protected boolean autoStartup -
running
protected volatile boolean running
-
-
Constructor Details
-
AbstractPulsarMessageContainer
public AbstractPulsarMessageContainer()
-
-
Method Details
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-
getApplicationEventPublisher
Get the event publisher.- Returns:
- the publisher
-
setBeanName
- Specified by:
setBeanName
in interfaceBeanNameAware
-
getBeanName
Return the bean name.- Returns:
- the bean name.
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
getApplicationContext
-
setPhase
public void setPhase(int phase) -
getPhase
public int getPhase()- Specified by:
getPhase
in interfacePhased
- Specified by:
getPhase
in interfaceSmartLifecycle
-
doStart
protected abstract void doStart() -
doStop
protected abstract void doStop()
-