Class SimpleJmsHeaderMapper

java.lang.Object
org.springframework.messaging.support.AbstractHeaderMapper<Message>
org.springframework.jms.support.SimpleJmsHeaderMapper
All Implemented Interfaces:
JmsHeaderMapper, HeaderMapper<Message>

public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> implements JmsHeaderMapper
Simple implementation of JmsHeaderMapper.

This implementation copies JMS API headers (e.g. JMSReplyTo) to and from Messages. Any user-defined properties will also be copied from a JMS Message to a Message, and any other headers on a Message (beyond the JMS API headers) will likewise be copied to a JMS Message. Those other headers will be copied to the general properties of a JMS Message whereas the JMS API headers are passed to the appropriate setter methods (e.g. setJMSReplyTo).

Constants for the JMS API headers are defined in JmsHeaders. Note that most of the JMS headers are read-only: the JMSDestination, JMSDeliveryMode, JMSExpiration, JMSMessageID, JMSPriority, JMSRedelivered and JMSTimestamp flags are only copied from a JMS Message. Those values will not be passed along from a Message to an outbound JMS Message.

Since:
4.1
Author:
Mark Fisher, Gary Russell, Stephane Nicoll