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
FieldsFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddoStart()protected abstract voiddoStop()protected ApplicationContextGet the event publisher.Return the bean name.intgetPhase()voidsetApplicationContext(ApplicationContext applicationContext) voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetBeanName(String name) 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.beans.factory.DisposableBean
destroyMethods 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:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-
getApplicationEventPublisher
Get the event publisher.- Returns:
- the publisher
-
setBeanName
- Specified by:
setBeanNamein interfaceBeanNameAware
-
getBeanName
Return the bean name.- Returns:
- the bean name.
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
getApplicationContext
-
setPhase
public void setPhase(int phase) -
getPhase
public int getPhase()- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
doStart
protected abstract void doStart() -
doStop
protected abstract void doStop()
-