K - the key type.V - the value type.public abstract class AbstractMessageListenerContainer<K,V> extends java.lang.Object implements MessageListenerContainer, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.SmartLifecycle
MessageListenerContainer.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractMessageListenerContainer.AckMode
The offset commit behavior enumeration.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMessageListenerContainer(ContainerProperties containerProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.kafka.clients.consumer.ConsumerRebalanceListener |
createConsumerRebalanceListener()
Return default implementation of
ConsumerRebalanceListener instance. |
protected abstract void |
doStart() |
protected abstract void |
doStop(java.lang.Runnable callback) |
org.springframework.context.ApplicationEventPublisher |
getApplicationEventPublisher() |
java.lang.String |
getBeanName() |
ContainerProperties |
getContainerProperties() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
void |
setAutoStartup(boolean autoStartup) |
void |
setBeanName(java.lang.String name) |
void |
setPhase(int phase) |
protected void |
setRunning(boolean running) |
void |
setupMessageListener(java.lang.Object messageListener)
Setup the message listener to use.
|
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmetricsprotected AbstractMessageListenerContainer(ContainerProperties containerProperties)
public void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic java.lang.String getBeanName()
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic org.springframework.context.ApplicationEventPublisher getApplicationEventPublisher()
public boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
protected void setRunning(boolean running)
public boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void setPhase(int phase)
public int getPhase()
getPhase in interface org.springframework.context.Phasedpublic ContainerProperties getContainerProperties()
public void setupMessageListener(java.lang.Object messageListener)
MessageListenerContainerIllegalArgumentException
if that message listener type is not supported.setupMessageListener in interface MessageListenerContainermessageListener - the object to wrapped to the MessageListener.public final void start()
start in interface org.springframework.context.Lifecycleprotected abstract void doStart()
public final void stop()
stop in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecycleprotected abstract void doStop(java.lang.Runnable callback)
protected final org.apache.kafka.clients.consumer.ConsumerRebalanceListener createConsumerRebalanceListener()
ConsumerRebalanceListener instance.ConsumerRebalanceListener currently assigned to this container.