open class MarshallingMessageConverter : MessageConverter, InitializingBean
Spring JMS MessageConverter that uses a Marshaller and Unmarshaller. Marshals an object to a BytesMessage, or to a TextMessage if the targetType is set to MessageType#TEXT. Unmarshals from a TextMessage or BytesMessage to an object.
Author
Arjen Poutsma
Author
Juergen Hoeller
Since
3.0
See Also
org.springframework.jms.core.JmsTemplate#convertAndSendorg.springframework.jms.core.JmsTemplate#receiveAndConvert
MarshallingMessageConverter()
Construct a new MarshallingMessageConverter(marshaller: Marshaller)
Construct a new If the given Marshaller also implements the Unmarshaller interface, it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown. Note that all Marshaller implementations in Spring also implement the Unmarshaller interface, so that you can safely use this constructor. MarshallingMessageConverter(marshaller: Marshaller, unmarshaller: Unmarshaller)
Construct a new |
open fun afterPropertiesSet(): Unit |
|
open fun fromMessage(message: Message): Any
This implementation unmarshals the given Message into an object. |
|
open fun setMarshaller(marshaller: Marshaller): Unit
Set the Marshaller to be used by this message converter. |
|
open fun setTargetType(targetType: MessageType): Unit
Specify whether The default is |
|
open fun setUnmarshaller(unmarshaller: Unmarshaller): Unit
Set the Unmarshaller to be used by this message converter. |
|
open fun toMessage(object: Any, session: Session): Message
This implementation marshals the given object to a javax.jms.TextMessage or javax.jms.BytesMessage. The desired message type can be defined by setting the |