Class PayloadTypeConvertingTransformer<T,U>

Type Parameters:
T - inbound payload type.
U - outbound payload type.
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
  • Constructor Details

    • PayloadTypeConvertingTransformer

      public PayloadTypeConvertingTransformer()
  • Method Details

    • setConverter

      public void setConverter(org.springframework.core.convert.converter.Converter<T,U> converter)
      Specify the converter to use.
      Parameters:
      converter - The Converter.
    • doSetConverter

      protected final void doSetConverter(org.springframework.core.convert.converter.Converter<T,U> converter)
    • getConverter

      protected org.springframework.core.convert.converter.Converter<T,U> getConverter()
      Get the configured Converter.
      Returns:
      the converter.
    • onInit

      protected void onInit()
      Description copied from class: IntegrationObjectSupport
      Subclasses may implement this for initialization logic.
      Overrides:
      onInit in class IntegrationObjectSupport
    • transformPayload

      protected U transformPayload(T payload)
      Specified by:
      transformPayload in class AbstractPayloadTransformer<T,U>