org.apache.camel.component.file.strategy
Class FileProcessStrategySupport
java.lang.Object
org.apache.camel.component.file.strategy.FileProcessStrategySupport
- All Implemented Interfaces:
- FileProcessStrategy
- Direct Known Subclasses:
- DeleteFileProcessStrategy, NoOpFileProcessStrategy, RenameFileProcessStrategy
public abstract class FileProcessStrategySupport
- extends Object
- implements FileProcessStrategy
Base class for FileProcessStrategy
implementation to extend.
- Version:
- $Revision: 37863 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_LOCK_FILE_POSTFIX
public static final String DEFAULT_LOCK_FILE_POSTFIX
- See Also:
- Constant Field Values
FileProcessStrategySupport
protected FileProcessStrategySupport()
FileProcessStrategySupport
protected FileProcessStrategySupport(boolean lockFile)
FileProcessStrategySupport
protected FileProcessStrategySupport(boolean lockFile,
FileRenamer lockFileRenamer)
begin
public boolean begin(FileEndpoint endpoint,
FileExchange exchange,
File file)
throws Exception
- Description copied from interface:
FileProcessStrategy
- 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 FileProcessStrategy
- Parameters:
endpoint
- the endpointexchange
- the exchangefile
- the file
- Returns:
- true if the file can be processed (such as if a file lock could be obtained)
- Throws:
Exception
- can be thrown in case of errors
commit
public void commit(FileEndpoint endpoint,
FileExchange exchange,
File file)
throws Exception
- Description copied from interface:
FileProcessStrategy
- Releases any file locks and possibly deletes or moves the file
- Specified by:
commit
in interface FileProcessStrategy
- Parameters:
endpoint
- the endpointexchange
- the exchangefile
- the file
- Throws:
Exception
- can be thrown in case of errors
isLockFile
public boolean isLockFile()
setLockFile
public void setLockFile(boolean lockFile)
getLockFileRenamer
public FileRenamer getLockFileRenamer()
setLockFileRenamer
public void setLockFileRenamer(FileRenamer lockFileRenamer)
Copyright © 2008 IONA Open Source Community. All Rights Reserved.