Class AbstractRestHeritrixController
- java.lang.Object
-
- dk.netarkivet.harvester.heritrix3.controller.AbstractRestHeritrixController
-
- All Implemented Interfaces:
IHeritrixController
- Direct Known Subclasses:
HeritrixController
public abstract class AbstractRestHeritrixController extends Object implements IHeritrixController
Abstract base class for REST-based Heritrix controllers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractRestHeritrixController.LaunchResultHandler
Implementation of a LaunchResultHandler for Heritrix3.
-
Field Summary
Fields Modifier and Type Field Description protected PrintWriter
errorPrinter
protected Heritrix3Files
files
The various files used by Heritrix.protected org.netarchivesuite.heritrix3wrapper.LaunchResultHandlerAbstract
h3handler
protected org.netarchivesuite.heritrix3wrapper.CommandLauncher
h3launcher
protected org.netarchivesuite.heritrix3wrapper.Heritrix3Wrapper
h3wrapper
protected File
heritrixBaseDir
protected PrintWriter
outputPrinter
-
Constructor Summary
Constructors Constructor Description AbstractRestHeritrixController(Heritrix3Files files)
Create a AbstractRestHeritrixController object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Heritrix3Files
getFiles()
protected int
getGuiPort()
protected String
getHeritrixAdminName()
Get the login name for accessing the Heritrix3 GUI.protected String
getHeritrixAdminPassword()
Get the login password for accessing the Heritrix3 GUI.protected Heritrix3Files
getHeritrixFiles()
protected String
getHostName()
protected String
getJobDescription()
Return a human-readable description of the job.String
toString()
Get a string that describes the current controller in terms of job ID, harvest ID, and crawldir.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface dk.netarkivet.harvester.heritrix3.controller.IHeritrixController
atFinish, beginCrawlStop, cleanup, crawlIsEnded, getActiveToeCount, getCurrentProcessedKBPerSec, getHarvestInformation, getProgressStats, getQueuedUriCount, initialize, isPaused, requestCrawlStart, requestCrawlStop, stopHeritrix
-
-
-
-
Field Detail
-
files
protected final Heritrix3Files files
The various files used by Heritrix.
-
h3wrapper
protected org.netarchivesuite.heritrix3wrapper.Heritrix3Wrapper h3wrapper
-
h3launcher
protected org.netarchivesuite.heritrix3wrapper.CommandLauncher h3launcher
-
h3handler
protected org.netarchivesuite.heritrix3wrapper.LaunchResultHandlerAbstract h3handler
-
outputPrinter
protected PrintWriter outputPrinter
-
errorPrinter
protected PrintWriter errorPrinter
-
heritrixBaseDir
protected File heritrixBaseDir
-
-
Constructor Detail
-
AbstractRestHeritrixController
public AbstractRestHeritrixController(Heritrix3Files files)
Create a AbstractRestHeritrixController object.- Parameters:
files
- Files that are used to set up Heritrix.
-
-
Method Detail
-
getGuiPort
protected int getGuiPort()
- Returns:
- the HTTP port used by the Heritrix3 GUI.
-
getHeritrixFiles
protected Heritrix3Files getHeritrixFiles()
- Returns:
- the Heritrix3 files wrapper.
-
getHostName
protected String getHostName()
- Returns:
- the host name
-
getHeritrixAdminName
protected String getHeritrixAdminName()
Get the login name for accessing the Heritrix3 GUI. This name can be set in the settings.xml file.- Returns:
- Name to use for accessing Heritrix3 web GUI
-
getHeritrixAdminPassword
protected String getHeritrixAdminPassword()
Get the login password for accessing the Heritrix3 GUI. This password can be set in the settings.xml file.- Returns:
- Password to use for accessing the Heritrix3 GUI
-
toString
public String toString()
Get a string that describes the current controller in terms of job ID, harvest ID, and crawldir.
-
getJobDescription
protected String getJobDescription()
Return a human-readable description of the job. This will only be visible in the Heritrix GUI.- Returns:
- String containing various information grabbed from HeritrixFiles.
-
getFiles
public Heritrix3Files getFiles()
-
-