|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.component.file.strategy.FileProcessStrategySupport
public abstract class FileProcessStrategySupport
Base class for FileProcessStrategy
implementation to extend.
Constructor Summary | |
---|---|
protected |
FileProcessStrategySupport()
|
protected |
FileProcessStrategySupport(boolean lockFile)
|
protected |
FileProcessStrategySupport(boolean lockFile,
FileRenamer lockFileRenamer)
|
Method Summary | |
---|---|
boolean |
begin(FileEndpoint endpoint,
FileExchange exchange,
File file)
Called when work is about to begin on this file. |
void |
commit(FileEndpoint endpoint,
FileExchange exchange,
File file)
Releases any file locks and possibly deletes or moves the file after successful processing |
FileRenamer |
getLockFileRenamer()
|
boolean |
isLockFile()
|
void |
rollback(FileEndpoint endpoint,
FileExchange exchange,
File file)
Releases any file locks and possibly deletes or moves the file after unsuccessful processing |
void |
setLockFile(boolean lockFile)
|
void |
setLockFileRenamer(FileRenamer lockFileRenamer)
|
protected void |
unlockFile(FileEndpoint endpoint,
FileExchange exchange,
File file)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FileProcessStrategySupport()
protected FileProcessStrategySupport(boolean lockFile)
protected FileProcessStrategySupport(boolean lockFile, FileRenamer lockFileRenamer)
Method Detail |
---|
public boolean begin(FileEndpoint endpoint, FileExchange exchange, File file) throws Exception
FileProcessStrategy
begin
in interface FileProcessStrategy
endpoint
- the endpointexchange
- the exchangefile
- the file
Exception
- can be thrown in case of errorspublic void commit(FileEndpoint endpoint, FileExchange exchange, File file) throws Exception
FileProcessStrategy
commit
in interface FileProcessStrategy
endpoint
- the endpointexchange
- the exchangefile
- the file
Exception
- can be thrown in case of errorspublic void rollback(FileEndpoint endpoint, FileExchange exchange, File file)
FileProcessStrategy
rollback
in interface FileProcessStrategy
endpoint
- the endpointexchange
- the exchangefile
- the filepublic boolean isLockFile()
public void setLockFile(boolean lockFile)
public FileRenamer getLockFileRenamer()
public void setLockFileRenamer(FileRenamer lockFileRenamer)
protected void unlockFile(FileEndpoint endpoint, FileExchange exchange, File file) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |