|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.jms.DefaultMessageConverter
public class DefaultMessageConverter
A MessageConverter
implementation that is capable of delegating to
an existing converter instance. The default MessageConverter implementation
is SimpleMessageConverter
.
If 'extractJmsMessageBody' is true
(the default), the body
of each received JMS Message will be converted. Otherwise, the JMS Message
itself will be returned.
If 'extractIntegrationMessagePayload' is true
(the default),
the payload of each outbound Spring Integration Message will be passed to
the MessageConverter to produce the body of the JMS Message. Otherwise, the
Spring Integration Message itself will become the body of the JMS Message.
Constructor Summary | |
---|---|
DefaultMessageConverter()
Create a DefaultMessageConverter instance that will rely on the default SimpleMessageConverter . |
|
DefaultMessageConverter(MessageConverter converter)
Create a DefaultMessageConverter instance that will delegate to the provided MessageConverter instance. |
Method Summary | |
---|---|
Object |
fromMessage(javax.jms.Message jmsMessage)
Converts from a JMS Message to an integration Message payload. |
void |
setExtractIntegrationMessagePayload(boolean extractIntegrationMessagePayload)
Specify whether the outbound integration Message's payload should be extracted prior to conversion into a JMS Message. |
void |
setExtractJmsMessageBody(boolean extractJmsMessageBody)
Specify whether the inbound JMS Message's body should be extracted during the conversion process. |
javax.jms.Message |
toMessage(Object object,
javax.jms.Session session)
Converts from an integration Message to a JMS Message . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMessageConverter()
SimpleMessageConverter
.
public DefaultMessageConverter(MessageConverter converter)
MessageConverter
instance.
Method Detail |
---|
public void setExtractJmsMessageBody(boolean extractJmsMessageBody)
The default value is true
.
public void setExtractIntegrationMessagePayload(boolean extractIntegrationMessagePayload)
Typically, this setting should be determined by the expectations of
the target system. If the target system is not capable of understanding
a Spring Integration Message, then set this to true
.
On the other hand, if the system is not only capable of understanding a
Spring Integration Message but actually expected to rely upon Spring
Integration Message Header values, then this must be set to
false
to ensure that the actual Message will be passed
along with its Serializable headers.
The default value is true
.
public Object fromMessage(javax.jms.Message jmsMessage) throws javax.jms.JMSException, MessageConversionException
Message
to an integration Message payload.
If the 'extractJmsMessageBody' property is false
, the JMS Message itself
will be returned to be used as the payload.
fromMessage
in interface MessageConverter
javax.jms.JMSException
MessageConversionException
public javax.jms.Message toMessage(Object object, javax.jms.Session session) throws javax.jms.JMSException, MessageConversionException
Message
.
toMessage
in interface MessageConverter
javax.jms.JMSException
MessageConversionException
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |