spring-framework / org.springframework.jms.support.converter / MappingJackson2MessageConverter / toMessage

toMessage

open fun toMessage(object: Any, session: Session): Message
open fun toMessage(object: Any, session: Session, @Nullable conversionHint: Any): Message open fun toMessage(object: Any, session: Session, @Nullable jsonView: Class<*>): Message

Convert a Java object to a JMS Message using the specified json view and the supplied session to create the message object.

Parameters

object - the object to convert

session - the Session to use for creating a JMS Message

jsonView - the view to use to filter the content

Exceptions

javax.jms.JMSException - if thrown by JMS API methods

MessageConversionException - in case of conversion failure

Return
the JMS Message

Since
4.3