dk.netarkivet.harvester.webinterface
Class DomainIngester

java.lang.Object
  extended by java.lang.Thread
      extended by dk.netarkivet.harvester.webinterface.DomainIngester
All Implemented Interfaces:
java.lang.Runnable

public class DomainIngester
extends java.lang.Thread

This class manages a thread of ingesting domains.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  org.apache.commons.logging.Log log
          The log.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DomainIngester(javax.servlet.jsp.JspWriter out, java.io.File ingestFile, java.util.Locale l)
          Create a new ingester for a given session and outpout, reading domains from a file.
 
Method Summary
 java.lang.Exception getException()
           
 boolean isDone()
          Check whether or not the DomainIngester is finished.
 void run()
          Starts the ingesting thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

org.apache.commons.logging.Log log
The log.

Constructor Detail

DomainIngester

public DomainIngester(javax.servlet.jsp.JspWriter out,
                      java.io.File ingestFile,
                      java.util.Locale l)
Create a new ingester for a given session and outpout, reading domains from a file.

Parameters:
out - The writer that goes into HTML output
ingestFile - The file of domains to ingest.
l - the given locale
Method Detail

run

public void run()
Starts the ingesting thread. When 'done' is set to true, the thread is finished, and any exceptions are found in 'e'.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

isDone

public boolean isDone()
Check whether or not the DomainIngester is finished.

Returns:
true if finished; false otherwise

getException

public java.lang.Exception getException()
Returns:
any exception catched during ingest