Class SimpleMessageListenerContainer

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer
All Implemented Interfaces:
jakarta.jms.ExceptionListener, AutoCloseable, org.apache.camel.AfterPropertiesConfigured, MessageListenerContainer, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
ExclusiveQueueMessageListenerContainer, TemporaryQueueMessageListenerContainer

public class SimpleMessageListenerContainer extends org.apache.camel.support.service.ServiceSupport implements MessageListenerContainer, jakarta.jms.ExceptionListener
  • Constructor Details

    • SimpleMessageListenerContainer

      public SimpleMessageListenerContainer(SjmsEndpoint endpoint)
  • Method Details

    • getEndpoint

      public SjmsEndpoint getEndpoint()
    • setMessageListener

      public void setMessageListener(SessionMessageListener messageListener)
      Specified by:
      setMessageListener in interface MessageListenerContainer
    • setExceptionListener

      public void setExceptionListener(jakarta.jms.ExceptionListener exceptionListener)
      Specified by:
      setExceptionListener in interface MessageListenerContainer
    • getClientId

      public String getClientId()
    • setClientId

      public void setClientId(String clientId)
    • getDestinationName

      public String getDestinationName()
    • setDestinationName

      public void setDestinationName(String destinationName)
    • getDestinationCreationStrategy

      public DestinationCreationStrategy getDestinationCreationStrategy()
    • setDestinationCreationStrategy

      public void setDestinationCreationStrategy(DestinationCreationStrategy destinationCreationStrategy)
    • getConcurrentConsumers

      public int getConcurrentConsumers()
    • setConcurrentConsumers

      public void setConcurrentConsumers(int concurrentConsumers)
    • afterPropertiesConfigured

      public void afterPropertiesConfigured(org.apache.camel.CamelContext camelContext)
      Specified by:
      afterPropertiesConfigured in interface org.apache.camel.AfterPropertiesConfigured
    • getConnectionFactory

      public jakarta.jms.ConnectionFactory getConnectionFactory()
      Specified by:
      getConnectionFactory in interface MessageListenerContainer
    • configureConsumer

      protected void configureConsumer(jakarta.jms.MessageConsumer consumer, jakarta.jms.Session session) throws Exception
      Throws:
      Exception
    • onException

      public void onException(jakarta.jms.JMSException exception)
      Specified by:
      onException in interface jakarta.jms.ExceptionListener
    • recoverConnection

      protected boolean recoverConnection(org.apache.camel.util.backoff.BackOffTimer.Task task) throws Exception
      Throws:
      Exception
    • scheduleConnectionRecovery

      protected void scheduleConnectionRecovery()
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • initConsumers

      protected void initConsumers() throws Exception
      Throws:
      Exception
    • createSession

      protected jakarta.jms.Session createSession(jakarta.jms.Connection connection, SjmsEndpoint endpoint) throws Exception
      Throws:
      Exception
    • createMessageConsumer

      protected jakarta.jms.MessageConsumer createMessageConsumer(jakarta.jms.Session session) throws Exception
      Throws:
      Exception
    • stopConsumers

      protected void stopConsumers()
    • createConnection

      protected void createConnection() throws Exception
      Throws:
      Exception
    • refreshConnection

      protected final void refreshConnection() throws Exception
      Throws:
      Exception
    • startConnection

      protected void startConnection() throws Exception
      Throws:
      Exception
    • stopConnection

      protected void stopConnection()