Java Reference
In-Depth Information
* Exception thrown if there are any issues with
* the workload.
* @throws InterruptedException
* Called if any blocking operation is
* interrupted.
*/
public void process() throws WorkloadException
{
this.cancel = false;
this.startTime = new Date();
// process all hosts
do
{
processHost();
} while (this.workloadManager.nextHost() != null);
this.threadPool.shutdown();
this.stopTime = new Date();
}
public void setReport(SpiderReportable report)
{
this.report = report;
}
/**
* Process one individual host.
*
* @throws WorkloadException
* Exception thrown if there are any issues with
* the workload.
*/
private void processHost() throws WorkloadException
{
URL url = null;
String host = this.workloadManager.getCurrentHost();
// first notify the manager
if (!this.report.beginHost(host))
{
return;
}
// second, notify any filters of a new host
Search WWH ::




Custom Search