Class ContentTypeDelegatingMessageConverter

java.lang.Object
org.springframework.amqp.support.converter.ContentTypeDelegatingMessageConverter
All Implemented Interfaces:
MessageConverter

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.
Since:
1.4.2
Author:
Eric Rizzo, Gary Russell, Artem Bilan
  • Constructor Details

    • 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.
      Parameters:
      defaultConverter - the converter.
  • Method Details