All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Webcrawler.Controller.ControllerInterface

public interface ControllerInterface
Every Controller must implement this interface (Usually a new Controller should be derived from the class Controller which already implements this interface anyway). Since the Crawler can't import the Controller while the Controller imports the Crawler, this interface is needed for connecting those two objects together.


Method Index

 o addedANode(URLNode)
called by crawler when a node was added to the tree
 o crawlerDone()
called by crawler when finished
 o loadLink(LoadableNode)
says if n should be loaded (e.g.
 o localFileName(LoadableNode)
Returns a Filename(+Path) for saving the file represented by n.
 o nodeDone(URLNode)
When the node is done, the Crawler calls this method.
 o nodeLoaded(URLNode)
The Crawler tells the controller when a node is finished loading
 o willSonsBeLoaded(HTMLNode)
says if the node's n sons will be loaded in the future = will loadLink(sons of n) be true? This info is important for the Parsers, cuz' they don't need to do the +"/index.html"-check for every son if it won't be loaded.

Methods

 o willSonsBeLoaded
 public abstract boolean willSonsBeLoaded(HTMLNode n)
says if the node's n sons will be loaded in the future = will loadLink(sons of n) be true? This info is important for the Parsers, cuz' they don't need to do the +"/index.html"-check for every son if it won't be loaded.

 o loadLink
 public abstract boolean loadLink(LoadableNode n)
says if n should be loaded (e.g. FALSE if too deep)

 o localFileName
 public abstract String localFileName(LoadableNode n)
Returns a Filename(+Path) for saving the file represented by n. A Reader writes the downloaded data to that file.

 o addedANode
 public abstract void addedANode(URLNode n)
called by crawler when a node was added to the tree

 o nodeLoaded
 public abstract void nodeLoaded(URLNode n)
The Crawler tells the controller when a node is finished loading

 o nodeDone
 public abstract void nodeDone(URLNode n)
When the node is done, the Crawler calls this method. E.g: use this for deleting temporary files of the node

 o crawlerDone
 public abstract void crawlerDone()
called by crawler when finished


All Packages  Class Hierarchy  This Package  Previous  Next  Index