public interface GenericFileProcessStrategy<T>
Modifier and Type | Method and Description |
---|---|
void |
abort(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
Called when a begin is aborted, for example to release any resources which may have
been acquired during the
begin(GenericFileOperations, GenericFileEndpoint, org.apache.camel.Exchange, GenericFile)
operation. |
boolean |
begin(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
Called when work is about to begin on this file.
|
void |
commit(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
Releases any file locks and possibly deletes or moves the file after
successful processing
|
void |
prepareOnStartup(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint)
Allows custom logic to be run on first poll preparing the strategy,
such as removing old lock files etc.
|
void |
rollback(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
Releases any file locks and possibly deletes or moves the file after
unsuccessful processing
|
void prepareOnStartup(GenericFileOperations<T> operations, GenericFileEndpoint<T> endpoint) throws Exception
operations
- file operationsendpoint
- the endpointException
- can be thrown in case of errors which causes poll to failboolean begin(GenericFileOperations<T> operations, GenericFileEndpoint<T> endpoint, Exchange exchange, GenericFile<T> file) throws Exception
operations
- file operationsendpoint
- the endpointexchange
- the exchangefile
- the fileException
- can be thrown in case of errorsvoid abort(GenericFileOperations<T> operations, GenericFileEndpoint<T> endpoint, Exchange exchange, GenericFile<T> file) throws Exception
begin(GenericFileOperations, GenericFileEndpoint, org.apache.camel.Exchange, GenericFile)
operation.operations
- file operationsendpoint
- the endpointexchange
- the exchangefile
- the fileException
- can be thrown in case of errorsvoid commit(GenericFileOperations<T> operations, GenericFileEndpoint<T> endpoint, Exchange exchange, GenericFile<T> file) throws Exception
operations
- file operationsendpoint
- the endpointexchange
- the exchangefile
- the fileException
- can be thrown in case of errorsvoid rollback(GenericFileOperations<T> operations, GenericFileEndpoint<T> endpoint, Exchange exchange, GenericFile<T> file) throws Exception
operations
- file operationsendpoint
- the endpointexchange
- the exchangefile
- the fileException
- can be thrown in case of errorsApache Camel