Package org.springframework.pulsar.core
Class AbstractPulsarMessageContainer
java.lang.Object
org.springframework.pulsar.core.AbstractPulsarMessageContainer
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationEventPublisherAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
AbstractPulsarMessageListenerContainer,AbstractPulsarMessageReaderContainer
public abstract class AbstractPulsarMessageContainer
extends Object
implements org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware, org.springframework.context.SmartLifecycle, org.springframework.beans.factory.DisposableBean
Base class for the various container implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final org.springframework.core.log.LogAccessorprotected booleanFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddoStart()protected abstract voiddoStop()protected org.springframework.context.ApplicationContextorg.springframework.context.ApplicationEventPublisherGet the event publisher.Return the bean name.intgetPhase()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetApplicationEventPublisher(org.springframework.context.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.Lifecycle
isRunning, start, stopMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Field Details
-
logger
protected final org.springframework.core.log.LogAccessor logger -
autoStartup
protected boolean autoStartup -
running
protected volatile boolean running
-
-
Constructor Details
-
AbstractPulsarMessageContainer
public AbstractPulsarMessageContainer()
-
-
Method Details
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) - Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
getApplicationEventPublisher
@Nullable public org.springframework.context.ApplicationEventPublisher getApplicationEventPublisher()Get the event publisher.- Returns:
- the publisher
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getBeanName
Return the bean name.- Returns:
- the bean name.
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getApplicationContext
@Nullable protected org.springframework.context.ApplicationContext getApplicationContext() -
setPhase
public void setPhase(int phase) -
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
doStart
protected abstract void doStart() -
doStop
protected abstract void doStop()
-