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>
- Type Parameters:
T
- inbound payload type.U
- outbound payload type.
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,BeanNameAware
,InitializingBean
,ApplicationContextAware
,ExpressionCapable
,GenericTransformer<Message<?>,
,Message<?>> NamedComponent
,Transformer
- Direct Known Subclasses:
PayloadDeserializingTransformer
,PayloadSerializingTransformer
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
- Author:
- Gary Russell, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
doSetConverter
(Converter<T, U> converter) Get the configuredConverter
.protected void
onInit()
Subclasses may implement this for initialization logic.void
setConverter
(Converter<T, U> converter) Specify the converter to use.protected U
transformPayload
(T payload) Methods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformer
doTransform
Methods inherited from class org.springframework.integration.transformer.AbstractTransformer
transform
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, 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:IntegrationObjectSupport
Subclasses may implement this for initialization logic.- Overrides:
onInit
in classIntegrationObjectSupport
-
transformPayload
- Specified by:
transformPayload
in classAbstractPayloadTransformer<T,
U>
-