Spring Integration

org.springframework.integration.transformer
Class PayloadTypeConvertingTransformer<T,U>

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.transformer.AbstractTransformer
          extended by org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
              extended by 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, NamedComponent, 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
Author:
Gary Russell

Field Summary
protected  org.springframework.core.convert.converter.Converter<T,U> converter
           
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
PayloadTypeConvertingTransformer()
           
 
Method Summary
 void setConverter(org.springframework.core.convert.converter.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, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

converter

protected org.springframework.core.convert.converter.Converter<T,U> converter
Constructor Detail

PayloadTypeConvertingTransformer

public PayloadTypeConvertingTransformer()
Method Detail

setConverter

public void setConverter(org.springframework.core.convert.converter.Converter<T,U> converter)
Specify the converter to use.

Parameters:
converter - The Converter.

transformPayload

protected U transformPayload(T payload)
                      throws java.lang.Exception
Specified by:
transformPayload in class AbstractPayloadTransformer<T,U>
Throws:
java.lang.Exception

Spring Integration