Package org.springframework.amqp.support
Class SimpleAmqpHeaderMapper
- java.lang.Object
-
- org.springframework.messaging.support.AbstractHeaderMapper<MessageProperties>
-
- org.springframework.amqp.support.SimpleAmqpHeaderMapper
-
- All Implemented Interfaces:
AmqpHeaderMapper,HeaderMapper<MessageProperties>
public class SimpleAmqpHeaderMapper extends AbstractHeaderMapper<MessageProperties> implements AmqpHeaderMapper
Simple implementation ofAmqpHeaderMapper.This implementation copies AMQP API headers (e.g. appId) to and from
MessageHeaders.Any used-defined properties will also be copied from an AMQP Message to aMessage, and any other headers on a Message (beyond the AMQP headers) will likewise be copied to an AMQP Message. Those other headers will be copied to the general headers of aMessagePropertieswhereas the AMQP API headers are passed to the appropriate setter methods (e.g.MessageProperties.setAppId(java.lang.String).Constants for the AMQP header keys are defined in
AmqpHeaders.- Since:
- 1.4
- Author:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan, Stephane Nicoll
-
-
Field Summary
-
Fields inherited from class org.springframework.messaging.support.AbstractHeaderMapper
logger
-
-
Constructor Summary
Constructors Constructor Description SimpleAmqpHeaderMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromHeaders(MessageHeaders headers, MessageProperties amqpMessageProperties)MessageHeaderstoHeaders(MessageProperties amqpMessageProperties)-
Methods inherited from class org.springframework.messaging.support.AbstractHeaderMapper
fromHeaderName, getHeaderIfAvailable, setInboundPrefix, setOutboundPrefix, toHeaderName
-
-
-
-
Method Detail
-
fromHeaders
public void fromHeaders(MessageHeaders headers, MessageProperties amqpMessageProperties)
- Specified by:
fromHeadersin interfaceHeaderMapper<MessageProperties>
-
toHeaders
public MessageHeaders toHeaders(MessageProperties amqpMessageProperties)
- Specified by:
toHeadersin interfaceHeaderMapper<MessageProperties>
-
-