Class HeritrixLauncher
- java.lang.Object
-
- dk.netarkivet.harvester.heritrix3.HeritrixLauncherAbstract
-
- dk.netarkivet.harvester.heritrix3.controller.HeritrixLauncher
-
public class HeritrixLauncher extends HeritrixLauncherAbstract
BnF specific Heritrix3 launcher, that forces the use ofHeritrixController
. Every turn of the crawl control loop, asks the Heritrix3 controller to generate a progress report as aCrawlProgressMessage
and then send this message on the JMS bus to be consumed by theHarvestMonitor
instance.
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.harvester.heritrix3.HeritrixLauncherAbstract
CRAWL_CONTROL_WAIT_PERIOD
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doCrawl()
Initializes an Heritrix3controller, then launches the Heritrix3 instance.static HeritrixLauncher
getInstance(Heritrix3Files files, String jobName)
Get instance of this class.-
Methods inherited from class dk.netarkivet.harvester.heritrix3.HeritrixLauncherAbstract
getControllerArguments, getHeritrixFiles, makeTemplateReadyForHeritrix3, setupOrderfile
-
-
-
-
Method Detail
-
getInstance
public static HeritrixLauncher getInstance(Heritrix3Files files, String jobName) throws ArgumentNotValid
Get instance of this class.- Parameters:
files
- Object encapsulating location of Heritrix crawldir and configuration filesjobName
- a String uniquely specifying the job in this installation- Returns:
HeritrixLauncher
object- Throws:
ArgumentNotValid
- If either order.xml or seeds.txt does not exist, or argument files is null.
-
doCrawl
public void doCrawl() throws IOFailure
Initializes an Heritrix3controller, then launches the Heritrix3 instance. Then starts the crawl control loop:- Waits the amount of time configured in
HarvesterSettings.CRAWL_LOOP_WAIT_TIME
. - Obtains crawl progress information as a
CrawlProgressMessage
from the Heritrix controller - Sends a progress message via JMS
- If the crawl is reported as finished, end loop.
- Specified by:
doCrawl
in classHeritrixLauncherAbstract
- Throws:
IOFailure
- Waits the amount of time configured in
-
-