Class JmsMessageChannelSpec<S extends JmsMessageChannelSpec<S,​T>,​T extends AbstractJmsChannel>

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,​C>
org.springframework.integration.dsl.MessageChannelSpec<S,​T>
org.springframework.integration.jms.dsl.JmsPollableMessageChannelSpec<S,​T>
org.springframework.integration.jms.dsl.JmsMessageChannelSpec<S,​T>
Type Parameters:
S - the target JmsMessageChannelSpec implementation type.
T - the target channel implementation type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.integration.dsl.ComponentsRegistration
Direct Known Subclasses:
JmsPublishSubscribeMessageChannelSpec

public class JmsMessageChannelSpec<S extends JmsMessageChannelSpec<S,​T>,​T extends AbstractJmsChannel>
extends JmsPollableMessageChannelSpec<S,​T>
Since:
5.0
  • Constructor Details

    • JmsMessageChannelSpec

      protected JmsMessageChannelSpec​(javax.jms.ConnectionFactory connectionFactory)
  • Method Details

    • containerType

      public S containerType​(java.lang.Class<? extends org.springframework.jms.listener.AbstractMessageListenerContainer> containerType)
      Configure the type of the container. AbstractMessageListenerContainer. Defaults to DefaultMessageListenerContainer.
      Parameters:
      containerType - the containerType.
      Returns:
      the current JmsMessageChannelSpec.
    • concurrentConsumers

      public S concurrentConsumers​(int concurrentConsumers)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer or a SimpleMessageListenerContainer.
      Parameters:
      concurrentConsumers - the concurrentConsumers.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      DefaultMessageListenerContainer.setConcurrentConsumers(int), SimpleMessageListenerContainer.setConcurrentConsumers(int)
    • maxSubscribers

      public S maxSubscribers​(int maxSubscribers)
      Parameters:
      maxSubscribers - the maxSubscribers.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      SubscribableJmsChannel.setMaxSubscribers(int)
    • autoStartup

      public S autoStartup​(boolean autoStartup)
      Parameters:
      autoStartup - the autoStartup.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      SmartLifecycle
    • phase

      public S phase​(int phase)
      Parameters:
      phase - the phase.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      SmartLifecycle
    • errorHandler

      public S errorHandler​(org.springframework.util.ErrorHandler errorHandler)
      Parameters:
      errorHandler - the errorHandler.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractMessageListenerContainer.setErrorHandler(ErrorHandler)
    • exposeListenerSession

      public S exposeListenerSession​(boolean exposeListenerSession)
      Parameters:
      exposeListenerSession - the exposeListenerSession.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractMessageListenerContainer.setExposeListenerSession(boolean)
    • acceptMessagesWhileStopping

      public S acceptMessagesWhileStopping​(boolean acceptMessagesWhileStopping)
      Parameters:
      acceptMessagesWhileStopping - the acceptMessagesWhileStopping.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractMessageListenerContainer.setAcceptMessagesWhileStopping(boolean)
    • idleTaskExecutionLimit

      public S idleTaskExecutionLimit​(int idleTaskExecutionLimit)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      idleTaskExecutionLimit - the idleTaskExecutionLimit.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      DefaultMessageListenerContainer.setIdleTaskExecutionLimit(int)
    • maxMessagesPerTask

      public S maxMessagesPerTask​(int maxMessagesPerTask)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      maxMessagesPerTask - the maxMessagesPerTask.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      DefaultMessageListenerContainer.setMaxMessagesPerTask(int)
    • recoveryInterval

      public S recoveryInterval​(long recoveryInterval)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      recoveryInterval - the recoveryInterval.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      DefaultMessageListenerContainer.setRecoveryInterval(long)
    • taskExecutor

      public S taskExecutor​(java.util.concurrent.Executor taskExecutor)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer or a SimpleMessageListenerContainer.
      Parameters:
      taskExecutor - the taskExecutor.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      DefaultMessageListenerContainer.setTaskExecutor(Executor), SimpleMessageListenerContainer.setTaskExecutor(Executor)
    • transactionManager

      public S transactionManager​(org.springframework.transaction.PlatformTransactionManager transactionManager)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      transactionManager - the transactionManager.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractPollingMessageListenerContainer.setTransactionManager(PlatformTransactionManager)
    • transactionName

      public S transactionName​(java.lang.String transactionName)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      transactionName - the transactionName.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractPollingMessageListenerContainer.setTransactionName(String)
    • transactionTimeout

      public S transactionTimeout​(int transactionTimeout)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      transactionTimeout - the transactionTimeout.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractPollingMessageListenerContainer.setTransactionTimeout(int)
    • cacheLevel

      public S cacheLevel​(java.lang.Integer cacheLevel)
      Only applies if the containerType(Class) is a DefaultMessageListenerContainer.
      Parameters:
      cacheLevel - the value for org.springframework.jms.listener.DefaultMessageListenerContainer.cacheLevel
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      DefaultMessageListenerContainer.setCacheLevel(int)
    • subscriptionShared

      public S subscriptionShared​(boolean subscriptionShared)
      Parameters:
      subscriptionShared - the subscription shared boolean flag.
      Returns:
      the current JmsMessageChannelSpec.
      See Also:
      AbstractMessageListenerContainer.setSubscriptionShared(boolean)