Class SimpleJmsHeaderMapper
- All Implemented Interfaces:
- JmsHeaderMapper,- HeaderMapper<Message>
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
- 
Field SummaryFields inherited from class org.springframework.messaging.support.AbstractHeaderMapperloggerFields inherited from interface org.springframework.jms.support.JmsHeaderMapperCONTENT_TYPE_PROPERTY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringfromHeaderName(String headerName) Add the outbound prefix if necessary.voidfromHeaders(MessageHeaders headers, Message jmsMessage) Map from the givenMessageHeadersto the specified target message.protected StringtoHeaderName(String propertyName) Add the inbound prefix if necessary.Map from the given target message to abstractedMessageHeaders.Methods inherited from class org.springframework.messaging.support.AbstractHeaderMappergetHeaderIfAvailable, setInboundPrefix, setOutboundPrefix
- 
Constructor Details- 
SimpleJmsHeaderMapperpublic SimpleJmsHeaderMapper()
 
- 
- 
Method Details- 
fromHeadersDescription copied from interface:HeaderMapperMap from the givenMessageHeadersto the specified target message.- Specified by:
- fromHeadersin interface- HeaderMapper<Message>
- Parameters:
- headers- the abstracted MessageHeaders
- jmsMessage- the native target message
 
- 
toHeadersDescription copied from interface:HeaderMapperMap from the given target message to abstractedMessageHeaders.- Specified by:
- toHeadersin interface- HeaderMapper<Message>
- Parameters:
- jmsMessage- the native target message
- Returns:
- the abstracted MessageHeaders
 
- 
fromHeaderNameAdd the outbound prefix if necessary.Convert MessageHeaders.CONTENT_TYPEtocontent_typefor JMS compliance.- Overrides:
- fromHeaderNamein class- AbstractHeaderMapper<Message>
- See Also:
 
- 
toHeaderNameAdd the inbound prefix if necessary.Convert the JMS-compliant content_typetoMessageHeaders.CONTENT_TYPE.- Overrides:
- toHeaderNamein class- AbstractHeaderMapper<Message>
- See Also:
 
 
-