Interface FileProcessingChain
-
- All Known Implementing Classes:
DefaultFileProcessingChain
public interface FileProcessingChainA collection ofFileProcessorthat are executed, in order, on a specificSequencingObject.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<FileProcessor>getFileProcessors()Get the collection ofFileProcessorthat thisFileProcessingChainmanages.java.util.List<java.lang.Exception>launchChain(java.lang.Long sequencingObjectId)Launch the chain ofFileProcessoron the specificSequencingObject.voidsetFastFail(java.lang.Boolean fastFail)Set whether or not theFileProcessingChainshould fail on *all* exceptions.voidsetSleepDuration(java.lang.Integer sleepDuration)Set the amount of time (in seconds) that the processor chain should sleep each time it sleeps.voidsetTimeout(java.lang.Integer timeout)Set the total amount of time (in seconds) that the processor chain should wait for theSequencingObjectto appear before failing.
-
-
-
Method Detail
-
launchChain
java.util.List<java.lang.Exception> launchChain(java.lang.Long sequencingObjectId) throws FileProcessorTimeoutExceptionLaunch the chain ofFileProcessoron the specificSequencingObject.- Parameters:
sequencingObjectId- the id of theSequencingObjectto process.- Returns:
- any
Exceptionthrown during chain processing (in the same order asFileProcessorreturned bygetFileProcessors()). - Throws:
FileProcessorTimeoutException- when the processor chain waits too long for the specifiedSequencingObjectto appear in the database.
-
getFileProcessors
java.util.List<FileProcessor> getFileProcessors()
Get the collection ofFileProcessorthat thisFileProcessingChainmanages.- Returns:
- the
FileProcessorcollection managed by thisFileProcessingChain.
-
setFastFail
void setFastFail(java.lang.Boolean fastFail)
Set whether or not theFileProcessingChainshould fail on *all* exceptions.- Parameters:
fastFail- whether or not the chain should fail on exceptions.
-
setTimeout
void setTimeout(java.lang.Integer timeout)
Set the total amount of time (in seconds) that the processor chain should wait for theSequencingObjectto appear before failing.- Parameters:
timeout- the total amount of time in seconds that the processor chain should wait.
-
setSleepDuration
void setSleepDuration(java.lang.Integer sleepDuration)
Set the amount of time (in seconds) that the processor chain should sleep each time it sleeps.- Parameters:
sleepDuration- the amount of time in seconds that the processor chain should wait.
-
-