public class UnmarshallingTransformer extends AbstractPayloadTransformer<java.lang.Object,java.lang.Object>
Transformer that delegates to an OXM
Unmarshaller. Expects the payload to be of type Document,
String, File, Source or to have an instance of
SourceFactory that can convert to a Source. If
alwaysUseSourceFactory is set to true, then the SourceFactory
will be used to create the Source regardless of payload type.
The alwaysUseSourceFactory is ignored if payload is
MimeMessage.
The Unmarshaller may return a Message, but if the return value is not already a Message instance, a new Message will be created with that return value as its payload.
EXPRESSION_PARSER, logger| Constructor and Description |
|---|
UnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
void |
setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
If true always delegate to the
SourceFactory. |
void |
setSourceFactory(SourceFactory sourceFactory)
Provide the SourceFactory to be used.
|
java.lang.Object |
transformPayload(java.lang.Object payload) |
doTransformtransformafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic UnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller)
public void setSourceFactory(SourceFactory sourceFactory)
sourceFactory - The source factory.public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
SourceFactory.alwaysUseSourceFactory - true to always use the source factory.public java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportpublic java.lang.Object transformPayload(java.lang.Object payload)
transformPayload in class AbstractPayloadTransformer<java.lang.Object,java.lang.Object>