SequentialTaskMaster<Link> taskMaster = new SequentialTaskMaster<Link>();
taskMaster.setDelayTimer( simpleDelayTimer );
taskMaster.setExceptionHandler( new DefaultTaskExceptionHandler() );
CrawlingDroid helloCrawler = new SysoutCrawlingDroid( simpleQueue, taskMaster );
helloCrawler.setFiltersFactory(filtersFactory);
helloCrawler.setParserFactory(parserFactory);
helloCrawler.setProtocolFactory(protocolFactory);
Collection<String> initialLocations = new ArrayList<String>();
initialLocations.add( targetURL );
helloCrawler.setInitialLocations(initialLocations);
// Initialize and start the crawler
helloCrawler.init();
helloCrawler.start();
// Await termination
helloCrawler.getTaskMaster().awaitTermination(0, TimeUnit.MILLISECONDS);
// Shut down the HTTP connection manager
httpclient.getConnectionManager().shutdown();
}