Interface FileProcessingChain
-
- All Known Implementing Classes:
DefaultFileProcessingChain
public interface FileProcessingChain
A collection ofFileProcessor
that 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 ofFileProcessor
that thisFileProcessingChain
manages.java.util.List<java.lang.Exception>
launchChain(java.lang.Long sequencingObjectId)
Launch the chain ofFileProcessor
on the specificSequencingObject
.void
setFastFail(java.lang.Boolean fastFail)
Set whether or not theFileProcessingChain
should fail on *all* exceptions.void
setSleepDuration(java.lang.Integer sleepDuration)
Set the amount of time (in seconds) that the processor chain should sleep each time it sleeps.void
setTimeout(java.lang.Integer timeout)
Set the total amount of time (in seconds) that the processor chain should wait for theSequencingObject
to appear before failing.
-
-
-
Method Detail
-
launchChain
java.util.List<java.lang.Exception> launchChain(java.lang.Long sequencingObjectId) throws FileProcessorTimeoutException
Launch the chain ofFileProcessor
on the specificSequencingObject
.- Parameters:
sequencingObjectId
- the id of theSequencingObject
to process.- Returns:
- any
Exception
thrown during chain processing (in the same order asFileProcessor
returned bygetFileProcessors()
). - Throws:
FileProcessorTimeoutException
- when the processor chain waits too long for the specifiedSequencingObject
to appear in the database.
-
getFileProcessors
java.util.List<FileProcessor> getFileProcessors()
Get the collection ofFileProcessor
that thisFileProcessingChain
manages.- Returns:
- the
FileProcessor
collection managed by thisFileProcessingChain
.
-
setFastFail
void setFastFail(java.lang.Boolean fastFail)
Set whether or not theFileProcessingChain
should 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 theSequencingObject
to 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.
-
-