public class UnmarshallingTransformer
extends org.springframework.integration.transformer.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 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.
| Constructor and Description |
|---|
UnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComponentType() |
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()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.context.IntegrationObjectSupportpublic java.lang.Object transformPayload(java.lang.Object payload)
transformPayload in class org.springframework.integration.transformer.AbstractPayloadTransformer<java.lang.Object,java.lang.Object>