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 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.
logger
Constructor and Description |
---|
UnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller) |
Modifier and Type | Method and Description |
---|---|
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) |
doTransform
transform
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
public UnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller)
public void setSourceFactory(SourceFactory sourceFactory)
public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
SourceFactory
.public java.lang.Object transformPayload(java.lang.Object payload)
transformPayload
in class AbstractPayloadTransformer<java.lang.Object,java.lang.Object>