MessageConverter that delegates to a list of registered converters
to be invoked until one of them returns a non-null result.
As of 4.2.1, this composite converter implements SmartMessageConverter
in order to support the delegation of conversion hints.
| Modifier and Type | Field and Description |
|---|---|
| private final List |
| Access | Constructor and Description |
|---|---|
| public | CompositeMessageConverter(Collection<MessageConverter> converters)
Create an instance with the given converters. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | fromMessage(Message<?>
the input message message, Class<?> the target class for the conversion targetClass)Implements org. Convert the payload of a |
| public Object | fromMessage(Message<?>
the input message message, Class<?> the target class for the conversion targetClass, Object conversionHint)Implements org. A variant of |
| public List | |
| public Message | toMessage(Object
the Object to convert payload, MessageHeaders optional headers for the message (may be headers)null)Implements org. Create a |
| public Message | toMessage(Object
the Object to convert payload, MessageHeaders optional headers for the message (may be headers, Object conversionHint)null)Implements org. A variant of |
| public String |
| converters | back to summary |
|---|---|
| private final List<MessageConverter> converters | |
| CompositeMessageConverter | back to summary |
|---|---|
| public CompositeMessageConverter(Collection<MessageConverter> converters) Create an instance with the given converters. | |
| fromMessage | back to summary |
|---|---|
| public Object fromMessage(Message<?> message, Class<?> targetClass) Implements org. Doc from org. Convert the payload of a If the converter does not support the specified media type or cannot perform
the conversion, it should return | |
| fromMessage | back to summary |
|---|---|
| public Object fromMessage(Message<?> message, Class<?> targetClass, Object conversionHint) Implements org. Doc from org. A variant of
| |
| getConverters | back to summary |
|---|---|
| public List Return the underlying list of delegate converters. | |
| toMessage | back to summary |
|---|---|
| public Message Implements org. Doc from org. Create a If the converter does not support the specified media type or cannot perform
the conversion, it should return
| |
| toMessage | back to summary |
|---|---|
| public Message Implements org. Doc from org. A variant of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |