websphinx
Class Chronicle

java.lang.Object
  |
  +--rcm.util.Timer
        |
        +--websphinx.Chronicle
All Implemented Interfaces:
java.lang.Runnable

public class Chronicle
extends Timer
implements java.lang.Runnable

Run a crawler periodically.


Constructor Summary
Chronicle(Crawler crawler, int interval)
          Make a Chronicle.
 
Method Summary
protected  void alarm()
           
static void main(java.lang.String[] args)
           
 void run()
          Background thread that runs the crawler.
 void start()
          Start chronicling.
 void stop()
          Stop chronicling.
 
Methods inherited from class rcm.util.Timer
cancel, expired, getInterval, getPeriodic, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chronicle

public Chronicle(Crawler crawler,
                 int interval)
Make a Chronicle.

Parameters:
crawler - Crawler to run periodically
interval - Invocation interval, in seconds. Crawler is invoked every interval seconds. If the crawler is still running when interval seconds have elapsed, it is aborted.
Method Detail

start

public void start()
Start chronicling. Starts a background thread which starts the crawler immediately, then re-runs the crawler every interval seconds from now until stop() is called.


stop

public void stop()
Stop chronicling. Also stops the crawler, if it's currently running.


run

public void run()
Background thread that runs the crawler. Clients shouldn't call this.

Specified by:
run in interface java.lang.Runnable

alarm

protected void alarm()
Overrides:
alarm in class Timer

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception