|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.batch.FileBatchJob dk.netarkivet.common.utils.batch.LoadableJarBatchJob
public class LoadableJarBatchJob
This implementation of FileBatchJob is a bridge to a jar file given as a File object. The given class will be loaded and used to perform the actions of the FileBatchJob class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class dk.netarkivet.common.utils.batch.FileBatchJob |
---|
FileBatchJob.ExceptionOccurrence |
Field Summary | |
---|---|
(package private) FileBatchJob |
loadedJob
The FileBatchJob that this LoadableJarBatchJob is a wrapper for. |
(package private) org.apache.commons.logging.Log |
log
The log. |
Fields inherited from class dk.netarkivet.common.utils.batch.FileBatchJob |
---|
batchJobTimeout, exceptions, filesFailed, noOfFilesProcessed |
Constructor Summary | |
---|---|
LoadableJarBatchJob(java.lang.String jobClass,
java.util.List<java.lang.String> arguments,
java.io.File... jarFiles)
Load a given class from a jar file. |
Method Summary | |
---|---|
void |
finish(java.io.OutputStream os)
Finish the job. |
java.lang.String |
getLoadedJobClass()
Method for retrieving the name of the loaded class. |
void |
initialize(java.io.OutputStream os)
Initialize the job before running. |
boolean |
postProcess(java.io.InputStream input,
java.io.OutputStream output)
Processes the concatenated result files. |
boolean |
processFile(java.io.File file,
java.io.OutputStream os)
Process one file stored in the bit archive. |
java.lang.String |
toString()
Human readable representation of this object. |
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, wait, wait, wait |
Field Detail |
---|
transient FileBatchJob loadedJob
transient org.apache.commons.logging.Log log
Constructor Detail |
---|
public LoadableJarBatchJob(java.lang.String jobClass, java.util.List<java.lang.String> arguments, java.io.File... jarFiles) throws ArgumentNotValid
jarFiles
- The jar file(s) to load from. This file may also contain
other classes required by the FileBatchJob class.arguments
- The arguments for the batchjob.jobClass
- The class to load initially. This must be a subclass of
FileBatchJob.
ArgumentNotValid
- If any of the arguments are null.Method Detail |
---|
public void initialize(java.io.OutputStream os)
initialize
in class FileBatchJob
os
- the OutputStream to which output should be writtenpublic boolean processFile(java.io.File file, java.io.OutputStream os)
processFile
in class FileBatchJob
file
- the file to be processed.os
- the OutputStream to which output should be written
public void finish(java.io.OutputStream os)
finish
in class FileBatchJob
os
- the OutputStream to which output should be writtenpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean postProcess(java.io.InputStream input, java.io.OutputStream output)
FileBatchJob
postProcess
in class FileBatchJob
input
- The inputstream to the file containing the concatenated
results.output
- The outputstream where the resulting data should be
written.
public java.lang.String getLoadedJobClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |