Class AbstractMessageListenerContainer

java.lang.Object
com.azure.spring.messaging.listener.AbstractMessageListenerContainer
All Implemented Interfaces:
MessageListenerContainer, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public abstract class AbstractMessageListenerContainer extends Object implements MessageListenerContainer, org.springframework.beans.factory.BeanNameAware
The base implementation for the MessageListenerContainer.
  • Field Details

    • lifecycleMonitor

      protected final Object lifecycleMonitor
      Life cycle monitor.
  • Constructor Details

    • AbstractMessageListenerContainer

      public AbstractMessageListenerContainer()
  • Method Details

    • doStart

      protected abstract void doStart()
      Prepare the underlying SDK processor client and start it for subscribing.
    • doStop

      protected abstract void doStop()
      Stop the underlying SDK processor client.
    • stop

      public void stop(Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • getBeanName

      public String getBeanName()
      Return the bean name.
      Returns:
      the bean name.
    • setBeanName

      public void setBeanName(String beanName)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • isActive

      public boolean isActive()
      Whether this listener container has been started, no matter whether it is stopped later.
      Returns:
      whether this container is active.