org.springframework.integration.transformer
Class AbstractPayloadTransformer<T,U>
java.lang.Object
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
- All Implemented Interfaces:
- Transformer
- Direct Known Subclasses:
- MapToObjectTransformer, ObjectToMapTransformer, ObjectToStringTransformer, PayloadTypeConvertingTransformer, SourceCreatingTransformer, UnmarshallingTransformer
public abstract class AbstractPayloadTransformer<T,U>
- extends AbstractTransformer
A base class for Transformer
implementations that modify the payload
of a Message
. If the return value is itself a Message, it will be
used as the result. Otherwise, the return value will be used as the payload
of the result Message.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPayloadTransformer
public AbstractPayloadTransformer()
doTransform
public final U doTransform(Message<?> message)
throws Exception
- Description copied from class:
AbstractTransformer
- 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.
- Specified by:
doTransform
in class AbstractTransformer
- Throws:
Exception
transformPayload
protected abstract U transformPayload(T payload)
throws Exception
- Throws:
Exception
Copyright © 2010. All Rights Reserved.