org.apache.camel.component.file.strategy
Class FileStategySupport
java.lang.Object
org.apache.camel.component.file.strategy.FileStategySupport
- All Implemented Interfaces:
- FileStrategy
- Direct Known Subclasses:
- DeleteFileStrategy, NoOpFileStrategy, RenameFileStrategy
public abstract class FileStategySupport
- extends Object
- implements FileStrategy
- Version:
- $Revision: 1.1 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileStategySupport
protected FileStategySupport()
FileStategySupport
protected FileStategySupport(boolean lockFile)
begin
public boolean begin(FileEndpoint endpoint,
FileExchange exchange,
File file)
throws Exception
- Description copied from interface:
FileStrategy
- Called when work is about to begin on this file. This method may attempt to acquire some file lock before
returning true; returning false if the file lock could not be obtained so that the file should be ignored.
- Specified by:
begin
in interface FileStrategy
- Returns:
- true if the file can be processed (such as if a file lock could be obtained)
- Throws:
Exception
commit
public void commit(FileEndpoint endpoint,
FileExchange exchange,
File file)
throws Exception
- Description copied from interface:
FileStrategy
- Releases any file locks and possibly deletes or moves the file
- Specified by:
commit
in interface FileStrategy
- Throws:
Exception
isLockFile
public boolean isLockFile()
setLockFile
public void setLockFile(boolean lockFile)
Copyright © 2007 Apache Software Foundation. All Rights Reserved.