Class MarshallingTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.xml.transformer.AbstractXmlTransformer
org.springframework.integration.xml.transformer.MarshallingTransformer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ExpressionCapable,- GenericTransformer<Message<?>,,- Message<?>> - NamedComponent,- Transformer
An implementation of
 
AbstractTransformer that delegates
 to an OXM Marshaller.- Author:
- Mark Fisher, Jonas Partner, Gary Russell, Artem Bilan
- 
Field SummaryFields inherited from class org.springframework.integration.xml.transformer.AbstractXmlTransformerDOM_RESULT, STRING_RESULTFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructorsConstructorDescriptionMarshallingTransformer(Marshaller marshaller) MarshallingTransformer(Marshaller marshaller, ResultTransformer resultTransformer) 
- 
Method SummaryModifier and TypeMethodDescriptiondoTransform(Message<?> message) Subclasses must implement this method to provide the transformation logic.Subclasses may implement this method to provide component type information.voidsetExtractPayload(boolean extractPayload) Specify whether the source Message's payload should be extracted prior to marshalling.Methods inherited from class org.springframework.integration.xml.transformer.AbstractXmlTransformergetResultFactory, getResultFactoryName, getResultType, onInit, setResultFactory, setResultFactoryName, setResultTypeMethods 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, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
- 
Constructor Details- 
MarshallingTransformer
- 
MarshallingTransformer
 
- 
- 
Method Details- 
setExtractPayloadpublic void setExtractPayload(boolean extractPayload) Specify whether the source Message's payload should be extracted prior to marshalling. This value is set to "true" by default. To send the Message itself as input to the Marshaller instead, set this to "false".- Parameters:
- extractPayload- true if the payload should be extracted.
 
- 
getComponentTypeDescription copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- IntegrationObjectSupport
 
- 
doTransformDescription copied from class:AbstractTransformerSubclasses must implement this method to provide the transformation logic. If the return value is itself a Message, it will be used as the result. Otherwise, any non-null return value will be used as the payload of the result Message.- Specified by:
- doTransformin class- AbstractTransformer
- Parameters:
- message- The message.
- Returns:
- The result of the transformation.
 
 
-