org.springframework.integration.jms
Class JmsSendingMessageHandler
java.lang.Object
org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter
org.springframework.integration.jms.JmsSendingMessageHandler
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, MessageHandler
public class JmsSendingMessageHandler
- extends AbstractJmsTemplateBasedAdapter
- implements MessageHandler, org.springframework.core.Ordered
A MessageConsumer that sends the converted Message payload within
a JMS Message.
- Author:
- Mark Fisher
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JmsSendingMessageHandler
public JmsSendingMessageHandler()
setExtractPayload
public void setExtractPayload(boolean extractPayload)
- Specify whether the payload should be extracted from each Spring
Integration Message to be converted to the body of a JMS Message.
The default value is true
. To force creation of JMS
Messages whose body is the actual Spring Integration Message instance,
set this to false
.
setOrder
public void setOrder(int order)
getOrder
public int getOrder()
- Specified by:
getOrder
in interface org.springframework.core.Ordered
handleMessage
public final void handleMessage(Message<?> message)
- Description copied from interface:
MessageHandler
- Handles the message if possible. If the handler cannot deal with the
message this will result in a
MessageRejectedException
e.g.
in case of a Selective Consumer. When a consumer tries to handle a
message, but fails to do so, a MessageHandlingException
is
thrown. In the last case it is recommended to treat the message as tainted
and go into an error scenario.
When the handling results in a message being sent failure to send that
message will result in a MessageDeliveryException
.
- Specified by:
handleMessage
in interface MessageHandler
- Parameters:
message
- the message to be handled
configureMessageConverter
protected void configureMessageConverter(org.springframework.jms.core.JmsTemplate jmsTemplate,
JmsHeaderMapper headerMapper)
- Specified by:
configureMessageConverter
in class AbstractJmsTemplateBasedAdapter