Class AbstractTransformer

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

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

    • AbstractTransformer

      public AbstractTransformer()
  • 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.