Interface SmartMessageConverter
-
- All Superinterfaces:
MessageConverter
- All Known Implementing Classes:
AbstractJackson2MessageConverter,Jackson2JsonMessageConverter,Jackson2XmlMessageConverter
public interface SmartMessageConverter extends MessageConverter
An extendedMessageConverterSPI 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/toMessagevariants.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectfromMessage(Message message, java.lang.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 Detail
-
fromMessage
java.lang.Object fromMessage(Message message, java.lang.Object conversionHint) throws MessageConversionException
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
nullif the converter cannot perform the conversion. - Throws:
MessageConversionException- if the conversion fails.- See Also:
MessageConverter.fromMessage(Message)
-
-