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 Summary
Fields inherited from class org.springframework.integration.xml.transformer.AbstractXmlTransformer
DOM_RESULT, STRING_RESULTFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
ConstructorsConstructorDescriptionMarshallingTransformer(Marshaller marshaller) MarshallingTransformer(Marshaller marshaller, ResultTransformer resultTransformer) -
Method Summary
Modifier 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.AbstractXmlTransformer
getResultFactory, getResultFactoryName, getResultType, onInit, setResultFactory, setResultFactoryName, setResultTypeMethods inherited from class org.springframework.integration.transformer.AbstractTransformer
transformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, 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
-
setExtractPayload
public 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.
-
getComponentType
Description copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
getComponentTypein interfaceNamedComponent- Overrides:
getComponentTypein classIntegrationObjectSupport
-
doTransform
Description 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 classAbstractTransformer- Parameters:
message- The message.- Returns:
- The result of the transformation.
-