接口 SmartMessageConverter
- 所有超级接口:
MessageConverter
- 所有已知实现类:
MappingJackson2MessageConverter
public interface SmartMessageConverter extends MessageConverter
An extendedMessageConverterSPI with conversion hint support.In case of a conversion hint being provided, the framework will call the extended method if a converter implements this interface, instead of calling the regular
toMessagevariant.- 从以下版本开始:
- 4.3
- 作者:
- Stephane Nicoll
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 MessagetoMessage(Object object, Session session, Object conversionHint)A variant ofMessageConverter.toMessage(Object, Session)which takes an extra conversion context as an argument, allowing to take e.g. annotations on a payload parameter into account.从接口继承的方法 org.springframework.jms.support.converter.MessageConverter
fromMessage, toMessage
方法详细资料
toMessage
Message toMessage(Object object, Session session, @Nullable Object conversionHint) throws JMSException, MessageConversionException
A variant ofMessageConverter.toMessage(Object, Session)which takes an extra conversion context as an argument, allowing to take e.g. annotations on a payload parameter into account.- 参数:
object- the object to convertsession- the Session to use for creating a JMS MessageconversionHint- an extra object passed to theMessageConverter, e.g. the associatedMethodParameter(may benull}- 返回:
- the JMS Message
- 抛出:
JMSException- if thrown by JMS API methodsMessageConversionException- in case of conversion failure- 另请参阅:
MessageConverter.toMessage(Object, Session)