public final class MappingUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkDeliveryMode(Message<?> requestMessage,
MessageProperties messageProperties,
MessageDeliveryMode defaultDeliveryMode)
Check the delivery mode and update with the default if not already present.
|
static Message |
mapMessage(Message<?> requestMessage,
MessageConverter converter,
AmqpHeaderMapper headerMapper,
MessageDeliveryMode defaultDeliveryMode,
boolean headersMappedLast)
Map an o.s.m.Message to an o.s.a.core.Message.
|
static Message |
mapReplyMessage(Message<?> replyMessage,
MessageConverter converter,
AmqpHeaderMapper headerMapper,
MessageDeliveryMode defaultDeliveryMode,
boolean headersMappedLast)
Map a reply o.s.m.Message to an o.s.a.core.Message.
|
public static Message mapMessage(Message<?> requestMessage, MessageConverter converter, AmqpHeaderMapper headerMapper, MessageDeliveryMode defaultDeliveryMode, boolean headersMappedLast)
ContentTypeDelegatingMessageConverter
, AmqpHeaders.CONTENT_TYPE
and
MessageHeaders.CONTENT_TYPE
will be used for the selection, with the AMQP
header taking precedence.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.public static Message mapReplyMessage(Message<?> replyMessage, MessageConverter converter, AmqpHeaderMapper headerMapper, MessageDeliveryMode defaultDeliveryMode, boolean headersMappedLast)
ContentTypeDelegatingMessageConverter
, AmqpHeaders.CONTENT_TYPE
and
MessageHeaders.CONTENT_TYPE
will be used for the selection, with the AMQP
header taking precedence.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.public static void checkDeliveryMode(Message<?> requestMessage, MessageProperties messageProperties, @Nullable MessageDeliveryMode defaultDeliveryMode)
requestMessage
- the request message.messageProperties
- the mapped message properties.defaultDeliveryMode
- the default delivery mode.