dk.netarkivet.common.utils.batch
Class FileListJob

java.lang.Object
  extended by dk.netarkivet.common.utils.batch.FileBatchJob
      extended by dk.netarkivet.common.utils.batch.FileListJob
All Implemented Interfaces:
java.io.Serializable

public class FileListJob
extends FileBatchJob

A batch job which returns a list of all files in the bitarchive in which it runs.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
FileBatchJob.ExceptionOccurrence
 
Field Summary
protected  org.apache.commons.logging.Log log
          The class logger.
 
Fields inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
batchJobTimeout, exceptions, filesFailed, noOfFilesProcessed
 
Constructor Summary
FileListJob()
          The constructor.
 
Method Summary
 void finish(java.io.OutputStream os)
          Does nothing.
 void initialize(java.io.OutputStream os)
          Initializes fields in this class.
 boolean processFile(java.io.File file, java.io.OutputStream os)
          Writes the name of the arcfile to the OutputStream.
 java.lang.String toString()
          Return a human-readable representation of a FileListJob.
 
Methods inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
addException, addFinishException, addInitializeException, getBatchJobTimeout, getExceptions, getFilenamePattern, getFilesFailed, getNoOfFilesProcessed, maxExceptionsReached, postProcess, processOnlyFileNamed, processOnlyFilesMatching, processOnlyFilesMatching, processOnlyFilesNamed, setBatchJobTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected transient org.apache.commons.logging.Log log
The class logger. This variable is re-initialized during de-serialization.

Constructor Detail

FileListJob

public FileListJob()
The constructor.

Method Detail

initialize

public void initialize(java.io.OutputStream os)
Initializes fields in this class.

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

processFile

public boolean processFile(java.io.File file,
                           java.io.OutputStream os)
Writes the name of the arcfile to the OutputStream.

Specified by:
processFile in class FileBatchJob
Parameters:
file - an arcfile
os - the OutputStream to which data is to be written
Returns:
false If listing of this arcfile fails; otherwise true

finish

public void finish(java.io.OutputStream os)
Does nothing.

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

toString

public java.lang.String toString()
Return a human-readable representation of a FileListJob.

Overrides:
toString in class java.lang.Object
Returns:
a human-readable representation of a FileListJob