public class UnmarshallingTransformer extends AbstractPayloadTransformer<Object,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(Unmarshaller unmarshaller) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Object |
transformPayload(Object payload) |
doTransformtransformafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic UnmarshallingTransformer(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 String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportpublic Object transformPayload(Object payload)
transformPayload in class AbstractPayloadTransformer<Object,Object>