spring-framework / org.springframework.messaging.converter

Package org.springframework.messaging.converter

Types

AbstractMessageConverter

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.

DefaultContentTypeResolver

open class DefaultContentTypeResolver : ContentTypeResolver

A default ContentTypeResolver that checks the MessageHeaders#CONTENT_TYPE header or falls back to a default value.

The header value is expected to be a org.springframework.util.MimeType or a String that can be parsed into a MimeType.

GenericMessageConverter

open class GenericMessageConverter : SimpleMessageConverter

An extension of the SimpleMessageConverter that uses a ConversionService to convert the payload of the message to the requested type.

Return null if the conversion service cannot convert from the payload type to the requested type.

MarshallingMessageConverter

open class MarshallingMessageConverter : AbstractMessageConverter

Implementation of MessageConverter that can read and write XML using Spring's Marshaller and Unmarshaller abstractions.

This converter requires a Marshaller and Unmarshaller before it can be used. These can be injected by the constructor or bean properties.

Exceptions

MessageConversionException

open class MessageConversionException : MessagingException

An exception raised by MessageConverter implementations.