public interface MessageConverter
Modifier and Type | Method and Description |
---|---|
Object |
fromMessage(Message message)
Convert from a Message to a Java object.
|
Message |
toMessage(Object object,
MessageProperties messageProperties)
Convert a Java object to a Message.
|
default Message |
toMessage(Object object,
MessageProperties messageProperties,
Type genericType)
Convert a Java object to a Message.
|
Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException
object
- the object to convertmessageProperties
- The message properties.MessageConversionException
- in case of conversion failuredefault Message toMessage(Object object, MessageProperties messageProperties, @Nullable Type genericType) throws MessageConversionException
toMessage(Object, MessageProperties)
.object
- the object to convertmessageProperties
- The message properties.genericType
- the type to use to populate type headers.MessageConversionException
- in case of conversion failureObject fromMessage(Message message) throws MessageConversionException
message
- the message to convertMessageConversionException
- in case of conversion failure