Class DecodingTransformer<T>
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.DecodingTransformer<T>
- Type Parameters:
- T- the payload type.
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ComponentSourceAware,- ExpressionCapable,- GenericTransformer<Message<?>,,- Message<?>> - NamedComponent,- Transformer
AbstractPayloadTransformer that delegates to a codec to decode the
 payload from a byte[].- Since:
- 4.2
- Author:
- Gary Russell
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructorsConstructorDescriptionDecodingTransformer(Codec codec, Class<T> type) Construct an instance to use the supplied codec to decode to the supplied type.DecodingTransformer(Codec codec, Expression typeExpression) Construct an instance to use the supplied codec to decode to the supplied type.
- 
Method SummaryModifier and TypeMethodDescriptionprotected TdoTransform(Message<?> message) Subclasses must implement this method to provide the transformation logic.protected voidonInit()Subclasses may implement this for initialization logic.voidsetEvaluationContext(StandardEvaluationContext evaluationContext) Methods inherited from class org.springframework.integration.transformer.AbstractTransformertransformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
- 
Constructor Details- 
DecodingTransformerConstruct an instance to use the supplied codec to decode to the supplied type.- Parameters:
- codec- the codec.
- type- the type.
 
- 
DecodingTransformerConstruct an instance to use the supplied codec to decode to the supplied type.- Parameters:
- codec- the codec.
- typeExpression- an expression that evaluates to a- Class.
 
 
- 
- 
Method Details- 
setEvaluationContext
- 
onInitprotected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
- onInitin 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.
 
 
-