public final class MappingUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkDeliveryMode(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(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(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.
|
public static org.springframework.amqp.core.Message mapMessage(Message<?> requestMessage, org.springframework.amqp.support.converter.MessageConverter converter, AmqpHeaderMapper headerMapper, org.springframework.amqp.core.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 org.springframework.amqp.core.Message mapReplyMessage(Message<?> replyMessage, org.springframework.amqp.support.converter.MessageConverter converter, AmqpHeaderMapper headerMapper, org.springframework.amqp.core.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, org.springframework.amqp.core.MessageProperties messageProperties, @Nullable org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode)
requestMessage
- the request message.messageProperties
- the mapped message properties.defaultDeliveryMode
- the default delivery mode.