|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.integration.jms.HeaderMappingMessageConverter
public class HeaderMappingMessageConverter
A MessageConverter
implementation that is capable of delegating to
an existing converter instance and an existing JmsHeaderMapper
. The
default MessageConverter implementation is SimpleMessageConverter
,
and the default header mapper implementation is DefaultJmsHeaderMapper
.
If 'extractJmsMessageBody' is true
(the default), the body
of each received JMS Message will become the payload of a Spring Integration
Message. Otherwise, the JMS Message itself will be the payload of the Spring
Integration Message.
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.
The JmsHeaderMapper
will be applied regardless of the values
specified for Message extraction.
Constructor Summary | |
---|---|
HeaderMappingMessageConverter()
Create a HeaderMappingMessageConverter instance that will rely on the default SimpleMessageConverter and DefaultJmsHeaderMapper . |
|
HeaderMappingMessageConverter(JmsHeaderMapper headerMapper)
Create a HeaderMappingMessageConverter instance that will delegate to the provided JmsHeaderMapper instance and will use the default
SimpleMessageConverter implementation. |
|
HeaderMappingMessageConverter(org.springframework.jms.support.converter.MessageConverter converter)
Create a HeaderMappingMessageConverter instance that will delegate to the provided MessageConverter instance and will use the default
implementation of the JmsHeaderMapper strategy. |
|
HeaderMappingMessageConverter(org.springframework.jms.support.converter.MessageConverter converter,
JmsHeaderMapper headerMapper)
Create a HeaderMappingMessageConverter instance that will delegate to the provided MessageConverter and JmsHeaderMapper . |
Method Summary | |
---|---|
java.lang.Object |
fromMessage(javax.jms.Message jmsMessage)
Converts from a JMS Message to an integration Message. |
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(java.lang.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 HeaderMappingMessageConverter()
SimpleMessageConverter
and DefaultJmsHeaderMapper
.
public HeaderMappingMessageConverter(org.springframework.jms.support.converter.MessageConverter converter)
MessageConverter
instance and will use the default
implementation of the JmsHeaderMapper
strategy.
public HeaderMappingMessageConverter(JmsHeaderMapper headerMapper)
JmsHeaderMapper
instance and will use the default
SimpleMessageConverter
implementation.
public HeaderMappingMessageConverter(org.springframework.jms.support.converter.MessageConverter converter, JmsHeaderMapper headerMapper)
MessageConverter
and JmsHeaderMapper
.
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 java.lang.Object fromMessage(javax.jms.Message jmsMessage) throws javax.jms.JMSException, org.springframework.jms.support.converter.MessageConversionException
Message
to an integration Message.
fromMessage
in interface org.springframework.jms.support.converter.MessageConverter
javax.jms.JMSException
org.springframework.jms.support.converter.MessageConversionException
public javax.jms.Message toMessage(java.lang.Object object, javax.jms.Session session) throws javax.jms.JMSException, org.springframework.jms.support.converter.MessageConversionException
Message
.
toMessage
in interface org.springframework.jms.support.converter.MessageConverter
javax.jms.JMSException
org.springframework.jms.support.converter.MessageConversionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |