Class AbstractTransformer

java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
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:
AbstractPayloadTransformer, ClaimCheckInTransformer, ClaimCheckOutTransformer, DecodingTransformer, JsonToObjectTransformer, ObjectToJsonTransformer, SimpleFromAvroTransformer, SimpleToAvroTransformer, StreamTransformer

public abstract class AbstractTransformer
extends IntegrationObjectSupport
implements Transformer
A base class for Transformer implementations.
  • Constructor Details

  • Method Details

    • transform

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

      protected abstract java.lang.Object doTransform​(org.springframework.messaging.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.