Class AbstractRestHeritrixController
- java.lang.Object
-
- dk.netarkivet.harvester.heritrix3.controller.AbstractRestHeritrixController
-
- All Implemented Interfaces:
IHeritrixController
- Direct Known Subclasses:
HeritrixController
public abstract class AbstractRestHeritrixController extends java.lang.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 java.io.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 java.io.File
heritrixBaseDir
protected java.io.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 java.lang.String
getHeritrixAdminName()
Get the login name for accessing the Heritrix3 GUI.protected java.lang.String
getHeritrixAdminPassword()
Get the login password for accessing the Heritrix3 GUI.protected Heritrix3Files
getHeritrixFiles()
protected java.lang.String
getHostName()
protected java.lang.String
getJobDescription()
Return a human-readable description of the job.java.lang.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 java.io.PrintWriter outputPrinter
-
errorPrinter
protected java.io.PrintWriter errorPrinter
-
heritrixBaseDir
protected java.io.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 java.lang.String getHostName()
- Returns:
- the host name
-
getHeritrixAdminName
protected java.lang.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 java.lang.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 java.lang.String toString()
Get a string that describes the current controller in terms of job ID, harvest ID, and crawldir.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A human-readable string describing this controller.
-
getJobDescription
protected java.lang.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()
-
-