Class DomainIngester
- java.lang.Object
-
- java.lang.Thread
-
- dk.netarkivet.harvester.webinterface.DomainIngester
-
- All Implemented Interfaces:
java.lang.Runnable
public class DomainIngester extends java.lang.Thread
This class manages a thread that ingests (i.e. creates) new domains.
-
-
Constructor Summary
Constructors Constructor Description DomainIngester(javax.servlet.jsp.JspWriter out, java.io.File ingestFile, java.util.Locale l)
Create a new ingester for a given session and output, reading domains from a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
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 output, reading domains from a file.- Parameters:
out
- The writer that goes into HTML outputingestFile
- The file with a list 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 interfacejava.lang.Runnable
- Overrides:
run
in classjava.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 caught during ingest
-
-