Class CGatherer

java.lang.Object
   |
   +----CGatherer

public class CGatherer
extends Object
implements Runnable
Instances of this class spider a single web site. A number of gatherers running in parallel is launched by the search engine (class CSearchEngine). Communication between the search engine and the gatherer threads is done through a stack containing all web sites to be spidered. Each gatherer picks one of these sites' index URLS at a time and spiders all pages belonging to that site. If all sites have been spidered the gatherer threads implicitly terminate.
Each page spidered by a gatherer is parsed and pushed onto another stack. It is task of a higher layer object (in this case the search engine) to do something useful with these pages.

Version:
0.3
Author:
Jörg Caumanns

Constructor Index

 o CGatherer(CSyncedStack, CSyncedStack, ThreadGroup, int)
Setup a new gatherer thread and start spidering the requested subset of the web.

Method Index

 o isAlive()
 o run()
Start gathering.

Constructors

 o CGatherer
 public CGatherer(CSyncedStack ip,
                  CSyncedStack psf,
                  ThreadGroup thgrp,
                  int _iGatherer)
Setup a new gatherer thread and start spidering the requested subset of the web.

Parameters:
ip - stack conatining the index pages of all domains to spider
psf - stack to push all parsed pages on
thgrp - thread group this gatherer should run in
_iGatherer - unique id

Methods

 o run
 public void run()
Start gathering. This method is called implicitely by this classes constructor.

 o isAlive
 public boolean isAlive()