|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--de.rw7.htmltools.LinkSpider
This class actually does the work. It runs over an entire website, or a subdirectory, fishing out all broken links in HTML and CSS code. It also holds the information, which urls have been checked already, and which not.
Checking is done multithreaded. For each thread an instance of the inner class T is created.
| Inner Class Summary | |
(package private) class |
LinkSpider.T |
| Field Summary | |
private static boolean |
bugEqualsPresent |
private static boolean |
bugHostPresent |
protected LinkFrontend |
fe The associated frontend. |
protected HtmlTokenizer |
ht |
protected java.util.Hashtable |
pool Holds all urls checked up to now. |
protected java.net.URL |
root The root url to be checked. |
protected java.lang.String |
rootDir Holds the directory of the root url. |
protected java.lang.String |
rootHost |
protected int |
runningThreads The number of threads not waiting due to lack of work. |
private static int |
TARGET |
protected int |
targetNumber |
protected java.util.Hashtable |
targets Holds all defined target frame names. |
protected LinkSpider.T[] |
threads Holds all threads of the spider. |
protected java.util.Vector |
vakant Holds all urls not yet checked. |
protected boolean |
verifyExternals Tells the spider, to check links, which are not in or under the directory of the root url. |
| Constructor Summary | |
LinkSpider(LinkFrontend fe, java.net.URL root, boolean verifyExternals, int nthreads) The constructor of the spider. |
|
| Method Summary | |
(package private) static void |
<clinit>() |
private static java.lang.String |
extractDir(java.lang.String filename) |
java.util.Hashtable |
getPool() For debugging only. |
java.util.Hashtable |
getTargets() For debugging only. |
java.util.Enumeration |
getVakant() For debugging only. |
private static void |
setTags(HtmlTokenizer ht) |
void |
startVerify() Starts the spider. |
void |
stop() Stops the spider abnormally. |
protected void |
target(LinkFile lf, java.lang.String target, boolean definition) |
protected void |
urlAbsent(LinkFile ut, java.lang.Exception e) |
protected LinkFile |
urlLookup(int count) |
protected java.net.URL |
urlRequiredGet(java.net.URL u, LinkFile referrer) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
| Field Detail |
protected LinkFrontend fe
protected java.net.URL root
protected boolean verifyExternals
protected java.util.Hashtable pool
protected java.util.Vector vakant
protected java.util.Hashtable targets
LinkTargetprotected java.lang.String rootHost
protected java.lang.String rootDir
protected HtmlTokenizer ht
protected LinkSpider.T[] threads
protected int runningThreads
protected int targetNumber
private static boolean bugEqualsPresent
private static boolean bugHostPresent
private static final int TARGET
| Constructor Detail |
public LinkSpider(LinkFrontend fe,
java.net.URL root,
boolean verifyExternals,
int nthreads)
lv - the accociated frontend window.src - the root url.verifyExternals - whether to check url not in or under the root urls directorynthreads - the number of threads to be created.| Method Detail |
public final java.util.Hashtable getPool()
public final java.util.Enumeration getVakant()
public final java.util.Hashtable getTargets()
public void startVerify()
public final void stop()
protected final java.net.URL urlRequiredGet(java.net.URL u,
LinkFile referrer)
protected final LinkFile urlLookup(int count)
throws java.lang.InterruptedException
protected final void urlAbsent(LinkFile ut,
java.lang.Exception e)
protected final void target(LinkFile lf,
java.lang.String target,
boolean definition)
private static final java.lang.String extractDir(java.lang.String filename)
static void <clinit>()
private static final void setTags(HtmlTokenizer ht)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||