abstract class AbstractMessageConverter : SmartMessageConverter
Abstract base class for SmartMessageConverter implementations including support for common properties and a partial implementation of the conversion methods, mainly to check if the converter supports the conversion based on the payload class and MIME type.
Author
Rossen Stoyanchev
Author
Sebastien Deleuze
Author
Juergen Hoeller
Since
4.0
fun fromMessage(message: Message<*>, targetClass: Class<*>): Anyfun fromMessage(message: Message<*>, targetClass: Class<*>, conversionHint: Any): Any |
|
open fun getContentTypeResolver(): ContentTypeResolver
Return the configured ContentTypeResolver. |
|
open fun getSerializedPayloadClass(): Class<*>
Return the configured preferred serialization payload class. |
|
open fun getSupportedMimeTypes(): MutableList<MimeType>
Return the supported MIME types. |
|
open fun isStrictContentTypeMatch(): Boolean
Whether content type resolution must produce a value that matches one of the supported MIME types. |
|
open fun setContentTypeResolver(resolver: ContentTypeResolver): Unit
Configure the ContentTypeResolver to use to resolve the content type of an input message. Note that if no resolver is configured, then By default, a |
|
open fun setSerializedPayloadClass(payloadClass: Class<*>): Unit
Configure the preferred serialization class to use (byte[] or String) when converting an Object payload to a Message. The default value is byte[]. |
|
open fun setStrictContentTypeMatch(strictContentTypeMatch: Boolean): Unit
Whether this converter should convert messages for which no content type could be resolved through the configured org.springframework.messaging.converter.ContentTypeResolver. A converter can configured to be strict only when a When this flag is set to |
|
fun toMessage(payload: Any, headers: MessageHeaders): Message<*>fun toMessage(payload: Any, headers: MessageHeaders, conversionHint: Any): Message<*> |
open class MarshallingMessageConverter : AbstractMessageConverter
Implementation of MessageConverter that can read and write XML using Spring's Marshaller and Unmarshaller abstractions. This converter requires a |