dk.netarkivet.harvester.harvesting
Class DirectHeritrixController.SimpleCrawlStatusListener

java.lang.Object
  extended by dk.netarkivet.harvester.harvesting.DirectHeritrixController.SimpleCrawlStatusListener
All Implemented Interfaces:
org.archive.crawler.event.CrawlStatusListener
Enclosing class:
DirectHeritrixController

 class DirectHeritrixController.SimpleCrawlStatusListener
extends java.lang.Object
implements org.archive.crawler.event.CrawlStatusListener

Class for handling callbacks from Heritrix. Except for logging, all that happens is that - the constructor sets the value of crawlIsEnded to false - crawlEnded() callback method sets the value of crawlIsEnded to true. Note that the callbacks that occur are performed by a "foreign" thread, initiated by Heritrix. That is the reason that the crawlIsEnded field is an AtomicBoolean.

See Also:
CrawlStatusListener

Constructor Summary
DirectHeritrixController.SimpleCrawlStatusListener()
          Sets the value of crawlIsEnded to false
 
Method Summary
 void crawlCheckpoint(java.io.File checkpointDir)
          Called by CrawlController when checkpointing.
 void crawlEnded(java.lang.String s)
          Sets the value of crawlIsEnded to true Fired by the crawler when the crawl is ended.
 void crawlEnding(java.lang.String s)
          Fired by the crawler when the crawl is about to end (no reports written yet....toe threads might still be running....).
 void crawlPaused(java.lang.String s)
          Fired by the crawler when the crawl is paused.
 void crawlPausing(java.lang.String s)
          Fired by the crawler when the crawl is about to pause (toe threads might still be running.....).
 void crawlResuming(java.lang.String s)
          Fired by the crawler when the crawl is resuming.
 void crawlStarted(java.lang.String s)
          Fired by the crawler, when the crawl has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectHeritrixController.SimpleCrawlStatusListener

public DirectHeritrixController.SimpleCrawlStatusListener()
Sets the value of crawlIsEnded to false

Method Detail

crawlStarted

public void crawlStarted(java.lang.String s)
Fired by the crawler, when the crawl has started.

Specified by:
crawlStarted in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
s - Message to attach
See Also:
CrawlStatusListener.crawlStarted(java.lang.String)

crawlEnding

public void crawlEnding(java.lang.String s)
Fired by the crawler when the crawl is about to end (no reports written yet....toe threads might still be running....).

Specified by:
crawlEnding in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
s - Message to attach
See Also:
CrawlStatusListener.crawlEnding(java.lang.String)

crawlEnded

public void crawlEnded(java.lang.String s)
Sets the value of crawlIsEnded to true Fired by the crawler when the crawl is ended.

Specified by:
crawlEnded in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
s - Message to attach
See Also:
CrawlStatusListener.crawlEnded(java.lang.String)

crawlPausing

public void crawlPausing(java.lang.String s)
Fired by the crawler when the crawl is about to pause (toe threads might still be running.....).

Specified by:
crawlPausing in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
s - Message to attach
See Also:
CrawlStatusListener.crawlPausing(java.lang.String)

crawlPaused

public void crawlPaused(java.lang.String s)
Fired by the crawler when the crawl is paused.

Specified by:
crawlPaused in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
s - Message to attach
See Also:
CrawlStatusListener.crawlPaused(java.lang.String)

crawlResuming

public void crawlResuming(java.lang.String s)
Fired by the crawler when the crawl is resuming.

Specified by:
crawlResuming in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
s - Message to attach
See Also:
CrawlStatusListener.crawlResuming(java.lang.String)

crawlCheckpoint

public void crawlCheckpoint(java.io.File checkpointDir)
                     throws java.lang.Exception
Called by CrawlController when checkpointing. Allows checkpointing of local data.

Specified by:
crawlCheckpoint in interface org.archive.crawler.event.CrawlStatusListener
Parameters:
checkpointDir - Checkpoint dir. Write checkpoint state here.
Throws:
java.lang.Exception - A fatal exception. Any exceptions that are let out of this checkpoint are assumed fatal and terminate further checkpoint processing.
See Also:
CrawlStatusListener.crawlCheckpoint(java.io.File)