Java Reference
In-Depth Information
{
for (String name : options.filter)
{
SpiderFilter filter = (SpiderFilter)
Class.forName(name).newInstance();
this.filters.add(filter);
}
}
// perform startup
if (options.startup.equalsIgnoreCase(
SpiderOptions.STARTUP_RESUME))
{
this.workloadManager.resume();
} else
{
this.workloadManager.clear();
}
}
/**
* Add a URL for processing. Accepts a SpiderURL.
*
* @param url
* @throws WorkloadException
* Exception thrown if there are any issues with
* the workload.
*/
public void addURL(URL url, URL source, int depth)
throws WorkloadException
{
// check the depth
if ((this.options.maxDepth != -1) &&
(depth > this.options.maxDepth))
{
return;
}
// see if it does not pass any of the filters
for (SpiderFilter filter : this.filters)
{
if (filter.isExcluded(url))
{
return;
}
}
Search WWH ::




Custom Search