Interface SmartMessageConverter
- All Superinterfaces:
MessageConverter
- All Known Implementing Classes:
AbstractJackson2MessageConverter
,Jackson2JsonMessageConverter
,Jackson2XmlMessageConverter
An extended
MessageConverter
SPI with conversion hint support.
In case of a conversion hint being provided, the framework will call
these extended methods if a converter implements this interface, instead
of calling the regular fromMessage
/ toMessage
variants.
- Since:
- 2.0
- Author:
- Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptionfromMessage
(Message message, Object conversionHint) A variant ofMessageConverter.fromMessage(Message)
which takes an extra conversion context as an argument.Methods inherited from interface org.springframework.amqp.support.converter.MessageConverter
fromMessage, toMessage, toMessage
-
Method Details
-
fromMessage
A variant ofMessageConverter.fromMessage(Message)
which takes an extra conversion context as an argument.- Parameters:
message
- the input message.conversionHint
- an extra object passed to theMessageConverter
.- Returns:
- the result of the conversion, or
null
if the converter cannot perform the conversion. - Throws:
MessageConversionException
- if the conversion fails.- See Also:
-