org.springframework.integration.transformer
Class AbstractTransformer

java.lang.Object
  extended by org.springframework.integration.transformer.AbstractTransformer
All Implemented Interfaces:
Transformer
Direct Known Subclasses:
AbstractPayloadTransformer, MarshallingTransformer

public abstract class AbstractTransformer
extends java.lang.Object
implements Transformer

A base class for Transformer implementations.

Author:
Mark Fisher

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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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