Class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,​T>,​T extends AbstractAmqpChannel>

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.amqp.dsl.AmqpPollableMessageChannelSpec<S,​T>
Type Parameters:
S - the target AmqpPollableMessageChannelSpec 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:
AmqpMessageChannelSpec

public class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,​T>,​T extends AbstractAmqpChannel>
extends org.springframework.integration.dsl.MessageChannelSpec<S,​T>
A MessageChannelSpec for a AbstractAmqpChannels.
Since:
5.0
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected AmqpChannelFactoryBean amqpChannelFactoryBean  

    Fields inherited from class org.springframework.integration.dsl.MessageChannelSpec

    channel

    Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    PARSER, target

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected AmqpPollableMessageChannelSpec​(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)  
  • Method Summary

    Modifier and Type Method Description
    S amqpMessageConverter​(org.springframework.amqp.support.converter.MessageConverter messageConverter)  
    S channelTransacted​(boolean channelTransacted)
    Configure channelTransacted on both the RabbitTemplate (for sends) and SimpleMessageListenerContainer (for receives) when using Spring Integration 4.0.
    S defaultDeliveryMode​(org.springframework.amqp.core.MessageDeliveryMode mode)
    Configure the delivery mode for messages that don't have an AmqpHeaders.DELIVERY_MODE header.
    protected T doGet()  
    S encoding​(java.lang.String encoding)  
    S extractPayload​(boolean extract)
    Configure whether normal spring-messaging to AMQP message mapping is enabled.
    S headersMappedLast​(boolean headersLast)  
    protected S id​(java.lang.String id)  
    S inboundHeaderMapper​(AmqpHeaderMapper mapper)
    Configure the inbound header mapper to use when extractPayload(boolean) is true.
    S messagePropertiesConverter​(org.springframework.amqp.rabbit.support.MessagePropertiesConverter messagePropertiesConverter)
    Configure messagePropertiesConverter on both the RabbitTemplate (for sends) and SimpleMessageListenerContainer (for receives).
    S outboundHeaderMapper​(AmqpHeaderMapper mapper)
    Configure the outbound header mapper to use when extractPayload(boolean) is true.
    S queueName​(java.lang.String queueName)
    Also implicitly sets the id(String) (if not explicitly set).
    S templateChannelTransacted​(boolean channelTransacted)
    Configure channelTransacted on the RabbitTemplate used when sending messages to the channel.

    Methods inherited from class org.springframework.integration.dsl.MessageChannelSpec

    datatype, getComponentsToRegister, interceptor, messageConverter, wireTap, wireTap, wireTap

    Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    _this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • AmqpPollableMessageChannelSpec

      protected AmqpPollableMessageChannelSpec​(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)
  • Method Details

    • id

      protected S id​(@Nullable java.lang.String id)
      Overrides:
      id in class org.springframework.integration.dsl.IntegrationComponentSpec<S extends AmqpPollableMessageChannelSpec<S,​T>,​T extends AbstractAmqpChannel>
    • queueName

      public S queueName​(java.lang.String queueName)
      Also implicitly sets the id(String) (if not explicitly set).
      Parameters:
      queueName - the queueName.
      Returns:
      the spec.
      See Also:
      AmqpChannelFactoryBean.setQueueName(String)
    • encoding

      public S encoding​(java.lang.String encoding)
      Parameters:
      encoding - the encoding.
      Returns:
      the spec.
      See Also:
      RabbitTemplate.setEncoding(String)
    • amqpMessageConverter

      public S amqpMessageConverter​(org.springframework.amqp.support.converter.MessageConverter messageConverter)
      Parameters:
      messageConverter - the messageConverter.
      Returns:
      the spec.
      See Also:
      RabbitTemplate.setMessageConverter(MessageConverter)
    • channelTransacted

      public S channelTransacted​(boolean channelTransacted)
      Configure channelTransacted on both the RabbitTemplate (for sends) and SimpleMessageListenerContainer (for receives) when using Spring Integration 4.0. When using Spring Integration 4.1, only the container is configured. See templateChannelTransacted(boolean).
      Parameters:
      channelTransacted - the channelTransacted.
      Returns:
      the spec.
      See Also:
      RabbitAccessor.setChannelTransacted(boolean), RabbitAccessor.setChannelTransacted(boolean)
    • templateChannelTransacted

      public S templateChannelTransacted​(boolean channelTransacted)
      Configure channelTransacted on the RabbitTemplate used when sending messages to the channel. Only applies when Spring Integration 4.1 or greater is being used. Otherwise, see channelTransacted(boolean).
      Parameters:
      channelTransacted - the channelTransacted.
      Returns:
      the spec.
      See Also:
      RabbitAccessor.setChannelTransacted(boolean)
    • messagePropertiesConverter

      public S messagePropertiesConverter​(org.springframework.amqp.rabbit.support.MessagePropertiesConverter messagePropertiesConverter)
      Configure messagePropertiesConverter on both the RabbitTemplate (for sends) and SimpleMessageListenerContainer (for receives).
      Parameters:
      messagePropertiesConverter - the messagePropertiesConverter.
      Returns:
      the spec.
      See Also:
      RabbitTemplate.setMessagePropertiesConverter(org.springframework.amqp.rabbit.support.MessagePropertiesConverter), AbstractMessageListenerContainer.setMessagePropertiesConverter(org.springframework.amqp.rabbit.support.MessagePropertiesConverter)
    • defaultDeliveryMode

      public S defaultDeliveryMode​(org.springframework.amqp.core.MessageDeliveryMode mode)
      Configure the delivery mode for messages that don't have an AmqpHeaders.DELIVERY_MODE header. Default is MessageDeliveryMode.PERSISTENT.
      Parameters:
      mode - the mode.
      Returns:
      the spec.
    • extractPayload

      public S extractPayload​(boolean extract)
      Configure whether normal spring-messaging to AMQP message mapping is enabled. Default false.
      Parameters:
      extract - true to enable mapping.
      Returns:
      the spec.
      See Also:
      outboundHeaderMapper(AmqpHeaderMapper), inboundHeaderMapper(AmqpHeaderMapper)
    • outboundHeaderMapper

      public S outboundHeaderMapper​(AmqpHeaderMapper mapper)
      Configure the outbound header mapper to use when extractPayload(boolean) is true. Defaults to a DefaultAmqpHeaderMapper.
      Parameters:
      mapper - the mapper.
      Returns:
      the spec.
      See Also:
      extractPayload(boolean)
    • inboundHeaderMapper

      public S inboundHeaderMapper​(AmqpHeaderMapper mapper)
      Configure the inbound header mapper to use when extractPayload(boolean) is true. Defaults to a DefaultAmqpHeaderMapper.
      Parameters:
      mapper - the mapper.
      Returns:
      the spec.
      See Also:
      extractPayload(boolean)
    • headersMappedLast

      public S headersMappedLast​(boolean headersLast)
      Parameters:
      headersLast - true to map headers last.
      Returns:
      the spec.
      See Also:
      AbstractAmqpChannel.setHeadersMappedLast(boolean)
    • doGet

      protected T doGet()
      Overrides:
      doGet in class org.springframework.integration.dsl.MessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,​T>,​T extends AbstractAmqpChannel>