|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.file.strategy.GenericFileProcessStrategySupport<T>
public abstract class GenericFileProcessStrategySupport<T>
Base class for implementations of GenericFileProcessStrategy.
| Field Summary | |
|---|---|
protected GenericFileExclusiveReadLockStrategy<T> |
exclusiveReadLockStrategy
|
protected org.slf4j.Logger |
log
|
| Constructor Summary | |
|---|---|
GenericFileProcessStrategySupport()
|
|
| Method Summary | |
|---|---|
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 GenericFileProcessStrategy.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 |
protected void |
deleteLocalWorkFile(Exchange exchange)
|
GenericFileExclusiveReadLockStrategy<T> |
getExclusiveReadLockStrategy()
|
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. |
protected GenericFile<T> |
renameFile(GenericFileOperations<T> operations,
GenericFile<T> from,
GenericFile<T> to)
|
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 |
setExclusiveReadLockStrategy(GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger log
protected GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy
| Constructor Detail |
|---|
public GenericFileProcessStrategySupport()
| Method Detail |
|---|
public void prepareOnStartup(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint)
throws Exception
GenericFileProcessStrategy
prepareOnStartup in interface GenericFileProcessStrategy<T>operations - file operationsendpoint - the endpoint
Exception - can be thrown in case of errors which causes poll to fail
public boolean begin(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
GenericFileProcessStrategy
begin in interface GenericFileProcessStrategy<T>operations - file operationsendpoint - the endpointexchange - the exchangefile - the file
Exception - can be thrown in case of errors
public void abort(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
GenericFileProcessStrategyGenericFileProcessStrategy.begin(GenericFileOperations, GenericFileEndpoint, org.apache.camel.Exchange, GenericFile)
operation.
abort in interface GenericFileProcessStrategy<T>operations - file operationsendpoint - the endpointexchange - the exchangefile - the file
Exception - can be thrown in case of errors
public void commit(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
GenericFileProcessStrategy
commit in interface GenericFileProcessStrategy<T>operations - file operationsendpoint - the endpointexchange - the exchangefile - the file
Exception - can be thrown in case of errors
public void rollback(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint,
Exchange exchange,
GenericFile<T> file)
throws Exception
GenericFileProcessStrategy
rollback in interface GenericFileProcessStrategy<T>operations - file operationsendpoint - the endpointexchange - the exchangefile - the file
Exception - can be thrown in case of errorspublic GenericFileExclusiveReadLockStrategy<T> getExclusiveReadLockStrategy()
public void setExclusiveReadLockStrategy(GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy)
protected GenericFile<T> renameFile(GenericFileOperations<T> operations,
GenericFile<T> from,
GenericFile<T> to)
throws IOException
IOExceptionprotected void deleteLocalWorkFile(Exchange exchange)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||