Class AbstractTransformer

java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, InitializingBean, ApplicationContextAware, ExpressionCapable, NamedComponent, GenericTransformer<Message<?>,​Message<?>>, Transformer
Direct Known Subclasses:
AbstractPayloadTransformer, AbstractXmlTransformer, ClaimCheckInTransformer, ClaimCheckOutTransformer, DecodingTransformer, JsonToObjectTransformer, ObjectToJsonTransformer, SimpleFromAvroTransformer, SimpleToAvroTransformer, StreamTransformer, XPathTransformer

public abstract class AbstractTransformer
extends IntegrationObjectSupport
implements Transformer
A base class for Transformer implementations.
Author:
Mark Fisher, Oleg Zhurakousky
  • Constructor Details

  • Method Details

    • transform

      public final Message<?> transform​(Message<?> message)
      Specified by:
      transform in interface GenericTransformer<Message<?>,​Message<?>>
      Specified by:
      transform in interface Transformer
    • doTransform

      protected abstract Object doTransform​(Message<?> message)
      Subclasses 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.
      Parameters:
      message - The message.
      Returns:
      The result of the transformation.