Class ContentTypeDelegatingMessageConverter

  • All Implemented Interfaces:

    public class ContentTypeDelegatingMessageConverter
    extends Object
    implements MessageConverter
    A composite MessageConverter that delegates to an actual MessageConverter based on the contentType header. Supports a default converter when no content type matches. Note: the MessageProperties requires a content type header to select a converter when used for outbound conversion, but the converter will (generally) override it to match the actual conversion.
    Eric Rizzo, Gary Russell, Artem Bilan
    • Constructor Detail

      • ContentTypeDelegatingMessageConverter

        public ContentTypeDelegatingMessageConverter()
        Constructs an instance using a default SimpleMessageConverter.
      • ContentTypeDelegatingMessageConverter

        public ContentTypeDelegatingMessageConverter​(MessageConverter defaultConverter)
        Constructs an instance using a the supplied default converter. May be null meaning a strict content-type match is required.
        defaultConverter - the converter.