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.
Marshaller, Unmarshaller
| Modifier and Type | Field and Description |
|---|---|
| private Marshaller | |
| private Unmarshaller |
| Access | Constructor and Description |
|---|---|
| public | MarshallingMessageConverter()
Default construct allowing for |
| public | MarshallingMessageConverter(MimeType...
the MIME types supportedMimeTypes)Constructor with a given list of MIME types to support. |
| public | MarshallingMessageConverter(Marshaller
object used as marshaller and unmarshaller marshaller)Constructor with |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | canConvertFrom(Message<?> message, Class<?> targetClass)
Overrides org. |
| protected boolean | canConvertTo(Object payload, MessageHeaders headers)
Overrides org. |
| protected Object | convertFromInternal(Message<?>
the input message message, Class<?> the target class for the conversion targetClass, Object conversionHint)Overrides org. |
| protected Object | convertToInternal(Object
the Object to convert payload, MessageHeaders optional headers for the message (may be headers, Object conversionHint)null)Overrides org. |
| public Marshaller | |
| private Source | |
| public Unmarshaller | |
| public void | |
| public void | setUnmarshaller(Unmarshaller unmarshaller)
Set the |
| protected boolean | supports(Class<?>
the class to test for support clazz)Implements abstract org. |
| marshaller | back to summary |
|---|---|
| private Marshaller marshaller
| |
| unmarshaller | back to summary |
|---|---|
| private Unmarshaller unmarshaller
| |
| MarshallingMessageConverter | back to summary |
|---|---|
| public MarshallingMessageConverter() Default construct allowing for | |
| MarshallingMessageConverter | back to summary |
|---|---|
| public MarshallingMessageConverter(MimeType... supportedMimeTypes) Constructor with a given list of MIME types to support.
| |
| MarshallingMessageConverter | back to summary |
|---|---|
| public MarshallingMessageConverter(Marshaller marshaller) Constructor with Note that all
| |
| canConvertFrom | back to summary |
|---|---|
| protected boolean canConvertFrom(Message<?> message, Class<?> targetClass) Overrides org.
| |
| canConvertTo | back to summary |
|---|---|
| protected boolean canConvertTo(Object payload, MessageHeaders headers) Overrides org.
| |
| convertFromInternal | back to summary |
|---|---|
| protected Object convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint) Overrides org. Doc from org. Convert the message payload from serialized form to an Object.
| |
| convertToInternal | back to summary |
|---|---|
| protected Object convertToInternal(Object payload, MessageHeaders headers, Object conversionHint) Overrides org. Doc from org. Convert the payload object to serialized form.
| |
| getMarshaller | back to summary |
|---|---|
| public Marshaller getMarshaller() Return the configured Marshaller.
| |
| getSource | back to summary |
|---|---|
| private Source getSource(Object payload) | |
| getUnmarshaller | back to summary |
|---|---|
| public Unmarshaller getUnmarshaller() Return the configured unmarshaller.
| |
| setMarshaller | back to summary |
|---|---|
| public void setMarshaller(Marshaller marshaller) Set the | |
| setUnmarshaller | back to summary |
|---|---|
| public void setUnmarshaller(Unmarshaller unmarshaller) Set the | |
| supports | back to summary |
|---|---|
| protected boolean supports(Class<?> clazz) Implements abstract org. Doc from org. Whether the given class is supported by this converter. | |