Spring Integration

org.springframework.integration.transformer
Class AbstractTransformer

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.transformer.AbstractTransformer
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent, Transformer
Direct Known Subclasses:
AbstractPayloadTransformer, ClaimCheckInTransformer, ClaimCheckOutTransformer, MarshallingTransformer, XPathTransformer, XsltPayloadTransformer

public abstract class AbstractTransformer
extends IntegrationObjectSupport
implements Transformer

A base class for Transformer implementations.

Author:
Mark Fisher, Oleg Zhurakousky

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
AbstractTransformer()
           
 
Method Summary
protected abstract  java.lang.Object doTransform(Message<?> message)
          Subclasses must implement this method to provide the transformation logic.
 Message<?> transform(Message<?> message)
           
 
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
 

Constructor Detail

AbstractTransformer

public AbstractTransformer()
Method Detail

transform

public final Message<?> transform(Message<?> message)
Specified by:
transform in interface Transformer

doTransform

protected abstract java.lang.Object doTransform(Message<?> message)
                                         throws java.lang.Exception
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.

Throws:
java.lang.Exception

Spring Integration