Class UnmarshallingTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<Object,Object>
org.springframework.integration.xml.transformer.UnmarshallingTransformer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ExpressionCapable,- NamedComponent,- GenericTransformer<Message<?>,Message<?>>,- Transformer
public class UnmarshallingTransformer extends AbstractPayloadTransformer<Object,Object>
An implementation of 
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.
- Author:
- Jonas Partner, Artem Bilan, Gary Russell
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructors Constructor Description UnmarshallingTransformer(Unmarshaller unmarshaller)
- 
Method SummaryModifier and Type Method Description StringgetComponentType()Subclasses may implement this method to provide component type information.voidsetAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)If true always delegate to theSourceFactory.voidsetSourceFactory(SourceFactory sourceFactory)Provide the SourceFactory to be used.ObjecttransformPayload(Object payload)Methods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformerdoTransformMethods inherited from class org.springframework.integration.transformer.AbstractTransformertransformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, 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, toString
- 
Constructor Details
- 
Method Details- 
setSourceFactoryProvide the SourceFactory to be used. Must not be null.- Parameters:
- sourceFactory- The source factory.
 
- 
setAlwaysUseSourceFactorypublic void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)If true always delegate to theSourceFactory.- Parameters:
- alwaysUseSourceFactory- true to always use the source factory.
 
- 
getComponentTypeDescription copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- IntegrationObjectSupport
 
- 
transformPayload- Specified by:
- transformPayloadin class- AbstractPayloadTransformer<Object,Object>
 
 
-