dk.netarkivet.archive.arcrepository.distribute
Class ArcFileRemover

java.lang.Object
  extended by dk.netarkivet.common.utils.batch.FileBatchJob
      extended by dk.netarkivet.archive.arcrepository.distribute.ArcFileRemover
All Implemented Interfaces:
java.io.Serializable

public class ArcFileRemover
extends FileBatchJob

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
FileBatchJob.ExceptionOccurrence
 
Field Summary
 
Fields inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
batchJobTimeout, exceptions, filesFailed, noOfFilesProcessed
 
Constructor Summary
ArcFileRemover()
           
 
Method Summary
 void finish(java.io.OutputStream os)
          Finish up the job.
 void initialize(java.io.OutputStream os)
          Initialize the job before runnning.
 boolean processFile(java.io.File file, java.io.OutputStream os)
          Process one file stored in the bit archive.
 
Methods inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
addException, addFinishException, addInitializeException, getBatchJobTimeout, getExceptions, getFilenamePattern, getFilesFailed, getNoOfFilesProcessed, maxExceptionsReached, processOnlyFileNamed, processOnlyFilesMatching, processOnlyFilesMatching, processOnlyFilesNamed, setBatchJobTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcFileRemover

public ArcFileRemover()
Method Detail

finish

public void finish(java.io.OutputStream os)
Description copied from class: FileBatchJob
Finish up the job. This is called after the last process() call. If the initialize() call throws an exception, this will still be called so that any resources allocated can be cleaned up. Implementations should make sure that this method can handle a partial initialization

Specified by:
finish in class FileBatchJob
Parameters:
os - the OutputStream to which output should be written

initialize

public void initialize(java.io.OutputStream os)
Description copied from class: FileBatchJob
Initialize the job before runnning. This is called before the processFile() calls. If this throws an exception, processFile() will not be called, but finish() will,

Specified by:
initialize in class FileBatchJob
Parameters:
os - the OutputStream to which output should be written

processFile

public boolean processFile(java.io.File file,
                           java.io.OutputStream os)
Description copied from class: FileBatchJob
Process one file stored in the bit archive.

Specified by:
processFile in class FileBatchJob
Parameters:
file - the file to be processed.
os - the OutputStream to which output should be written
Returns:
true if the file was successfully processed, false otherwise