org.apache.camel.component.file.strategy
Class GenericFileDeleteProcessStrategy<T>
java.lang.Object
org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport<T>
org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy<T>
- All Implemented Interfaces:
- GenericFileProcessStrategy<T>
public class GenericFileDeleteProcessStrategy<T>
- extends GenericFileProcessStrategySupport<T>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericFileDeleteProcessStrategy
public GenericFileDeleteProcessStrategy()
begin
public boolean begin(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
- Description copied from interface:
GenericFileProcessStrategy
- 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 GenericFileProcessStrategy<T>
- Overrides:
begin
in class GenericFileProcessStrategySupport<T>
- Parameters:
operations
- file operationsendpoint
- 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(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
- Description copied from interface:
GenericFileProcessStrategy
- Releases any file locks and possibly deletes or moves the file after
successful processing
- Specified by:
commit
in interface GenericFileProcessStrategy<T>
- Overrides:
commit
in class GenericFileProcessStrategySupport<T>
- Parameters:
operations
- file operationsendpoint
- the endpointexchange
- the exchangefile
- the file
- Throws:
Exception
- can be thrown in case of errors
rollback
public void rollback(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
- Description copied from interface:
GenericFileProcessStrategy
- Releases any file locks and possibly deletes or moves the file after
unsuccessful processing
- Specified by:
rollback
in interface GenericFileProcessStrategy<T>
- Overrides:
rollback
in class GenericFileProcessStrategySupport<T>
- Parameters:
operations
- file operationsendpoint
- the endpointexchange
- the exchangefile
- the file
- Throws:
Exception
- can be thrown in case of errors
getFailureRenamer
public GenericFileRenamer<T> getFailureRenamer()
setFailureRenamer
public void setFailureRenamer(GenericFileRenamer<T> failureRenamer)
getBeginRenamer
public GenericFileRenamer<T> getBeginRenamer()
setBeginRenamer
public void setBeginRenamer(GenericFileRenamer<T> beginRenamer)
Apache CAMEL