Spring Integration

org.springframework.integration.file.transformer
Class AbstractFilePayloadTransformer<T>

java.lang.Object
  extended by org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<T>
All Implemented Interfaces:
Transformer
Direct Known Subclasses:
FileToByteArrayTransformer, FileToStringTransformer

public abstract class AbstractFilePayloadTransformer<T>
extends Object
implements Transformer

Base class for transformers that convert a File payload.

Author:
Mark Fisher

Constructor Summary
AbstractFilePayloadTransformer()
           
 
Method Summary
 void setDeleteFiles(boolean deleteFiles)
          Specify whether to delete the File after transformation.
 Message<?> transform(Message<?> message)
           
protected abstract  T transformFile(File file)
          Subclasses must implement this method to transform the File contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilePayloadTransformer

public AbstractFilePayloadTransformer()
Method Detail

setDeleteFiles

public void setDeleteFiles(boolean deleteFiles)
Specify whether to delete the File after transformation. Default is false.


transform

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

transformFile

protected abstract T transformFile(File file)
                            throws Exception
Subclasses must implement this method to transform the File contents.

Throws:
Exception

Spring Integration

Copyright © 2010. All Rights Reserved.