Class MappingUtils

java.lang.Object
org.springframework.integration.amqp.support.MappingUtils

public final class MappingUtils
extends java.lang.Object
Utility methods used during message mapping.
Since:
4.3
  • Method Summary

    Modifier and Type Method Description
    static void checkDeliveryMode​(org.springframework.messaging.Message<?> requestMessage, org.springframework.amqp.core.MessageProperties messageProperties, org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode)
    Check the delivery mode and update with the default if not already present.
    static org.springframework.amqp.core.Message mapMessage​(org.springframework.messaging.Message<?> requestMessage, org.springframework.amqp.support.converter.MessageConverter converter, AmqpHeaderMapper headerMapper, org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode, boolean headersMappedLast)
    Map an o.s.m.Message to an o.s.a.core.Message.
    static org.springframework.amqp.core.Message mapReplyMessage​(org.springframework.messaging.Message<?> replyMessage, org.springframework.amqp.support.converter.MessageConverter converter, AmqpHeaderMapper headerMapper, org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode, boolean headersMappedLast)
    Map a reply o.s.m.Message to an o.s.a.core.Message.

    Methods inherited from class java.lang.Object

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

    • mapMessage

      public static org.springframework.amqp.core.Message mapMessage​(org.springframework.messaging.Message<?> requestMessage, org.springframework.amqp.support.converter.MessageConverter converter, AmqpHeaderMapper headerMapper, org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode, boolean headersMappedLast)
      Map an o.s.m.Message to an o.s.a.core.Message. When using a ContentTypeDelegatingMessageConverter, AmqpHeaders.CONTENT_TYPE and MessageHeaders.CONTENT_TYPE will be used for the selection, with the AMQP header taking precedence.
      Parameters:
      requestMessage - the request message.
      converter - the message converter to use.
      headerMapper - the header mapper to use.
      defaultDeliveryMode - the default delivery mode.
      headersMappedLast - true if headers are mapped after conversion.
      Returns:
      the mapped Message.
    • mapReplyMessage

      public static org.springframework.amqp.core.Message mapReplyMessage​(org.springframework.messaging.Message<?> replyMessage, org.springframework.amqp.support.converter.MessageConverter converter, AmqpHeaderMapper headerMapper, org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode, boolean headersMappedLast)
      Map a reply o.s.m.Message to an o.s.a.core.Message. When using a ContentTypeDelegatingMessageConverter, AmqpHeaders.CONTENT_TYPE and MessageHeaders.CONTENT_TYPE will be used for the selection, with the AMQP header taking precedence.
      Parameters:
      replyMessage - the reply message.
      converter - the message converter to use.
      headerMapper - the header mapper to use.
      defaultDeliveryMode - the default delivery mode.
      headersMappedLast - true if headers are mapped after conversion.
      Returns:
      the mapped Message.
      Since:
      5.1.9
    • checkDeliveryMode

      public static void checkDeliveryMode​(org.springframework.messaging.Message<?> requestMessage, org.springframework.amqp.core.MessageProperties messageProperties, @Nullable org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode)
      Check the delivery mode and update with the default if not already present.
      Parameters:
      requestMessage - the request message.
      messageProperties - the mapped message properties.
      defaultDeliveryMode - the default delivery mode.