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.
-
addedANode(URLNode)
- called by crawler when a node was added to the tree
-
crawlerDone()
- called by crawler when finished
-
loadLink(LoadableNode)
- says if n should be loaded (e.g.
-
localFileName(LoadableNode)
- Returns a Filename(+Path) for saving the file represented by n.
-
nodeDone(URLNode)
- When the node is done, the Crawler calls this method.
-
nodeLoaded(URLNode)
- The Crawler tells the controller when a node is finished loading
-
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.
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.
loadLink
public abstract boolean loadLink(LoadableNode n)
- says if n should be loaded (e.g. FALSE if too deep)
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.
addedANode
public abstract void addedANode(URLNode n)
- called by crawler when a node was added to the tree
nodeLoaded
public abstract void nodeLoaded(URLNode n)
- The Crawler tells the controller when a node is finished loading
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
crawlerDone
public abstract void crawlerDone()
- called by crawler when finished
All Packages Class Hierarchy This Package Previous Next Index