Spring Framework

org.springframework.jms.core
Interface MessagePostProcessor


public interface MessagePostProcessor

To be used with JmsTemplate's send method that convert an object to a message. It allows for further modification of the message after it has been processed by the converter. This is useful for setting of JMS Header and Properties.

This often as an anonymous class within a method implementation.

Since:
1.1
Author:
Mark Pollack
See Also:
JmsTemplate.convertAndSend(String, Object, MessagePostProcessor), JmsTemplate.convertAndSend(javax.jms.Destination, Object, MessagePostProcessor), MessageConverter

Method Summary
 javax.jms.Message postProcessMessage(javax.jms.Message message)
          Apply a MessagePostProcessor to the message.
 

Method Detail

postProcessMessage

javax.jms.Message postProcessMessage(javax.jms.Message message)
                                     throws javax.jms.JMSException
Apply a MessagePostProcessor to the message. The returned message is typically a modified version of the original.

Parameters:
message - the JMS message from the MessageConverter
Returns:
the modified version of the Message
Throws:
javax.jms.JMSException - if thrown by JMS API methods

Spring Framework