Class CFetcher

java.lang.Object
   |
   +----CFetcher

public class CFetcher
extends Object
implements Runnable
Thread that does nothing but read one URL after another. Communication with the higher layers of the search engine is done through two stacks: one containing URLs to be read and one containing the files read. Objects on both stacks are instances of class CFetchedSourceFile.

Version:
0.2
Author:
Jörg Caumanns

Constructor Index

 o CFetcher(CSyncedStack, CSyncedStack, ThreadGroup)
Constructs a fetcher thread by telling him where to get his input and where to put his output.

Method Index

 o busy()
Returns true if this tread is currently reading an URL, otherwise false.
 o run()
Get the next URL, read the file, and handle it to the next higher layer by pushing it onthe appropriate stack.

Constructors

 o CFetcher
 public CFetcher(CSyncedStack _sncStFilesToFetch,
                 CSyncedStack _sncStUnseenSourceFiles,
                 ThreadGroup thgrp)
Constructs a fetcher thread by telling him where to get his input and where to put his output.

Parameters:
_sncStFilesToFetch - stack containing the URLs to be read
_sncStUnseenSourceFiles - stack containing the files read
thgrp - Thread group this object should run in

Methods

 o run
 public void run()
Get the next URL, read the file, and handle it to the next higher layer by pushing it onthe appropriate stack. This member function is called implicitely by the constructor.

 o busy
 public boolean busy()
Returns true if this tread is currently reading an URL, otherwise false.