public interface MessageConverter
Check out SimpleMessageConverter
for a default implementation,
converting between the 'standard' message payloads and JMS Message types.
JmsTemplate.setMessageConverter(org.springframework.jms.support.converter.MessageConverter)
,
MessageListenerAdapter.setMessageConverter(org.springframework.jms.support.converter.MessageConverter)
,
JmsInvokerClientInterceptor.setMessageConverter(org.springframework.jms.support.converter.MessageConverter)
,
JmsInvokerServiceExporter.setMessageConverter(org.springframework.jms.support.converter.MessageConverter)
Modifier and Type | Method and Description |
---|---|
Object |
fromMessage(Message message)
Convert from a JMS Message to a Java object.
|
Message |
toMessage(Object object,
Session session)
Convert a Java object to a JMS Message using the supplied session
to create the message object.
|
Message toMessage(Object object, Session session) throws JMSException, MessageConversionException
object
- the object to convertsession
- the Session to use for creating a JMS MessageJMSException
- if thrown by JMS API methodsMessageConversionException
- in case of conversion failureObject fromMessage(Message message) throws JMSException, MessageConversionException
message
- the message to convertJMSException
- if thrown by JMS API methodsMessageConversionException
- in case of conversion failure