public class GenericFileOnCompletion<T> extends Object implements org.apache.camel.spi.Synchronization
Exchange has been processed.
The work is for example to move the processed file into a backup folder,
delete the file or in case of processing failure do a rollback.| Constructor and Description |
|---|
GenericFileOnCompletion(GenericFileEndpoint<T> endpoint,
GenericFileOperations<T> operations,
GenericFileProcessStrategy processStrategy,
GenericFile<T> file,
String absoluteFileName) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.spi.ExceptionHandler |
getExceptionHandler() |
protected void |
handleDoneFile(org.apache.camel.Exchange exchange) |
protected void |
handleException(String message,
org.apache.camel.Exchange exchange,
Throwable t) |
void |
onComplete(org.apache.camel.Exchange exchange) |
protected void |
onCompletion(org.apache.camel.Exchange exchange) |
void |
onFailure(org.apache.camel.Exchange exchange) |
protected void |
processStrategyCommit(GenericFileProcessStrategy<T> processStrategy,
org.apache.camel.Exchange exchange,
GenericFile<T> file)
Strategy when the file was processed and a commit should be executed.
|
protected void |
processStrategyRollback(GenericFileProcessStrategy<T> processStrategy,
org.apache.camel.Exchange exchange,
GenericFile<T> file)
Strategy when the file was not processed and a rollback should be
executed.
|
void |
setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler) |
String |
toString() |
public GenericFileOnCompletion(GenericFileEndpoint<T> endpoint, GenericFileOperations<T> operations, GenericFileProcessStrategy processStrategy, GenericFile<T> file, String absoluteFileName)
public void onComplete(org.apache.camel.Exchange exchange)
onComplete in interface org.apache.camel.spi.Synchronizationpublic void onFailure(org.apache.camel.Exchange exchange)
onFailure in interface org.apache.camel.spi.Synchronizationpublic org.apache.camel.spi.ExceptionHandler getExceptionHandler()
public void setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler)
protected void onCompletion(org.apache.camel.Exchange exchange)
protected void processStrategyCommit(GenericFileProcessStrategy<T> processStrategy, org.apache.camel.Exchange exchange, GenericFile<T> file)
processStrategy - the strategy to perform the commitexchange - the exchangefile - the file processedprotected void processStrategyRollback(GenericFileProcessStrategy<T> processStrategy, org.apache.camel.Exchange exchange, GenericFile<T> file)
processStrategy - the strategy to perform the commitexchange - the exchangefile - the file processedprotected void handleDoneFile(org.apache.camel.Exchange exchange)
protected void handleException(String message, org.apache.camel.Exchange exchange, Throwable t)
Apache Camel