Package org.apache.droids.impl

Examples of org.apache.droids.impl.SysoutCrawlingDroid


    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();
  }
View Full Code Here


    final CrawlingDroid droid = createDroid(queue);
    instance = (CrawlingWorker) droid.getNewWorker();
  }
 
  private final CrawlingDroid createDroid(final Queue<Link> queue) {
    final CrawlingDroid droid = new SysoutCrawlingDroid(queue, null);
   
    final ProtocolFactory protocolFactory = DroidsFactory.createDefaultProtocolFactory();
    droid.setProtocolFactory(protocolFactory);
   
    final ParserFactory parserFactory = parserSetup();
    droid.setParserFactory(parserFactory);
    return droid;
  }
View Full Code Here

    final CrawlingDroid droid = createDroid(queue);
    instance = (CrawlingWorker) droid.getNewWorker();
  }
 
  private final CrawlingDroid createDroid(final Queue<Link> queue) {
    final CrawlingDroid droid = new SysoutCrawlingDroid(queue, null);
   
    final ProtocolFactory protocolFactory = DroidsFactory.createDefaultProtocolFactory();
    droid.setProtocolFactory(protocolFactory);
   
    final ParserFactory parserFactory = parserSetup();
    droid.setParserFactory(parserFactory);
    return droid;
  }
View Full Code Here

    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();
  }
View Full Code Here

TOP

Related Classes of org.apache.droids.impl.SysoutCrawlingDroid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.