Spring Integration

org.springframework.integration.jms
Class DefaultJmsHeaderMapper

java.lang.Object
  extended by org.springframework.integration.jms.DefaultJmsHeaderMapper
All Implemented Interfaces:
JmsHeaderMapper, HeaderMapper<javax.jms.Message>

public class DefaultJmsHeaderMapper
extends Object
implements JmsHeaderMapper

Default implementation of JmsHeaderMapper.

This implementation copies JMS API headers (e.g. JMSReplyTo) to and from Spring Integration Messages. Any user-defined properties will also be copied from a JMS Message to a Spring Integration Message, and any other headers on a Spring Integration 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 the JMSMessageID and JMSRedelivered flag are only copied from a JMS Message. Those values will not be passed along from a Spring Integration Message to an outbound JMS Message.

Author:
Mark Fisher

Constructor Summary
DefaultJmsHeaderMapper()
           
 
Method Summary
 void fromHeaders(MessageHeaders headers, javax.jms.Message jmsMessage)
           
 Map<String,Object> toHeaders(javax.jms.Message jmsMessage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJmsHeaderMapper

public DefaultJmsHeaderMapper()
Method Detail

fromHeaders

public void fromHeaders(MessageHeaders headers,
                        javax.jms.Message jmsMessage)
Specified by:
fromHeaders in interface HeaderMapper<javax.jms.Message>

toHeaders

public Map<String,Object> toHeaders(javax.jms.Message jmsMessage)
Specified by:
toHeaders in interface HeaderMapper<javax.jms.Message>

Spring Integration

Copyright © 2010. All Rights Reserved.