Class PayloadTypeConvertingTransformer<T,U>
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
org.springframework.integration.transformer.PayloadTypeConvertingTransformer<T,U>
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,ExpressionCapable,NamedComponent,GenericTransformer<org.springframework.messaging.Message<?>,org.springframework.messaging.Message<?>>,Transformer
- Direct Known Subclasses:
PayloadDeserializingTransformer,PayloadSerializingTransformer
public class PayloadTypeConvertingTransformer<T,U> extends AbstractPayloadTransformer<T,U>
Transformer that converts the inbound payload to an object by delegating to a
Converter<Object, Object>. A reference to the delegate must be provided.
- Since:
- 2.0
-
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
Constructors Constructor Description PayloadTypeConvertingTransformer() -
Method Summary
Modifier and Type Method Description protected voiddoSetConverter(org.springframework.core.convert.converter.Converter<T,U> converter)protected org.springframework.core.convert.converter.Converter<T,U>getConverter()Get the configuredConverter.protected voidonInit()Subclasses may implement this for initialization logic.voidsetConverter(org.springframework.core.convert.converter.Converter<T,U> converter)Specify the converter to use.protected UtransformPayload(T payload)Methods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformer
doTransformMethods 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, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
-
Constructor Details
-
PayloadTypeConvertingTransformer
public PayloadTypeConvertingTransformer()
-
-
Method Details
-
setConverter
Specify the converter to use.- Parameters:
converter- The Converter.
-
doSetConverter
-
getConverter
Get the configuredConverter.- Returns:
- the converter.
-
onInit
protected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
onInitin classIntegrationObjectSupport
-
transformPayload
- Specified by:
transformPayloadin classAbstractPayloadTransformer<T,U>
-