dk.netarkivet.harvester.harvesting.controller
Class AbstractJMXHeritrixController

java.lang.Object
  extended by dk.netarkivet.harvester.harvesting.controller.AbstractJMXHeritrixController
All Implemented Interfaces:
HeritrixController
Direct Known Subclasses:
BnfHeritrixController, JMXHeritrixController

public abstract class AbstractJMXHeritrixController
extends java.lang.Object
implements HeritrixController

Abstract base class for JMX-based Heritrix controllers.


Constructor Summary
AbstractJMXHeritrixController(HeritrixFiles files)
          Create a BnfHeritrixController object.
 
Method Summary
protected  int getGuiPort()
           
protected  HeritrixFiles getHeritrixFiles()
           
protected  java.lang.String getHostName()
           
protected  int getJmxPort()
           
protected  java.lang.String getJobDescription()
          Return a human-readable description of the job.
protected  boolean processHasExited()
          Return true if the Heritrix process has exited, logging the exit value if so.
 java.lang.String toString()
          Get a string that describes the current controller in terms of job ID, harvest ID, and crawldir.
protected  void waitForHeritrixProcessExit()
          Waits for the Heritrix process to exit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dk.netarkivet.harvester.harvesting.controller.HeritrixController
atFinish, beginCrawlStop, cleanup, crawlIsEnded, getActiveToeCount, getCurrentProcessedKBPerSec, getHarvestInformation, getProgressStats, getQueuedUriCount, initialize, isPaused, requestCrawlStart, requestCrawlStop
 

Constructor Detail

AbstractJMXHeritrixController

public AbstractJMXHeritrixController(HeritrixFiles files)
Create a BnfHeritrixController object.

Parameters:
files - Files that are used to set up Heritrix.
Method Detail

getJmxPort

protected int getJmxPort()

getGuiPort

protected int getGuiPort()

getHeritrixFiles

protected HeritrixFiles getHeritrixFiles()
Returns:
the Heritrix files wrapper.

getHostName

protected java.lang.String getHostName()
Returns:
the host name

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 class java.lang.Object
Returns:
A human-readable string describing this controller.

processHasExited

protected boolean processHasExited()
Return true if the Heritrix process has exited, logging the exit value if so.

Returns:
True if the process has exited.

waitForHeritrixProcessExit

protected void waitForHeritrixProcessExit()
Waits for the Heritrix process to exit.


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.