public class ObjectStringMessageConverter
extends org.springframework.messaging.converter.AbstractMessageConverter
MessageConverter
to convert a
non-String objects to a String, when expected content type is "text/plain".
It only performs conversions to internal format and is a wrapper around
Object.toString()
.Constructor and Description |
---|
ObjectStringMessageConverter() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canConvertFrom(org.springframework.messaging.Message<?> message,
Class<?> targetClass) |
protected Object |
convertFromInternal(org.springframework.messaging.Message<?> message,
Class<?> targetClass,
Object conversionHint) |
protected Object |
convertToInternal(Object payload,
org.springframework.messaging.MessageHeaders headers,
Object conversionHint) |
protected boolean |
supports(Class<?> clazz) |
canConvertTo, fromMessage, fromMessage, getContentTypeResolver, getDefaultContentType, getMimeType, getSerializedPayloadClass, getSupportedMimeTypes, isStrictContentTypeMatch, setContentTypeResolver, setSerializedPayloadClass, setStrictContentTypeMatch, supportsMimeType, toMessage, toMessage
protected boolean supports(Class<?> clazz)
supports
in class org.springframework.messaging.converter.AbstractMessageConverter
protected boolean canConvertFrom(org.springframework.messaging.Message<?> message, Class<?> targetClass)
canConvertFrom
in class org.springframework.messaging.converter.AbstractMessageConverter
protected Object convertFromInternal(org.springframework.messaging.Message<?> message, Class<?> targetClass, Object conversionHint)
convertFromInternal
in class org.springframework.messaging.converter.AbstractMessageConverter
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.