org.apache.droids.robot.crawler
Class CrawlingDroid
java.lang.Object
org.apache.droids.helper.Loggable
org.apache.droids.AbstractDroid<Link>
org.apache.droids.robot.crawler.CrawlingDroid
- All Implemented Interfaces:
- Droid<Link>
public class CrawlingDroid
- extends AbstractDroid<Link>
| Fields inherited from class org.apache.droids.helper.Loggable |
log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrawlingDroid
public CrawlingDroid(TaskQueue<Link> queue,
TaskMaster<Link> taskMaster)
setInitialLocations
public void setInitialLocations(java.util.Collection<java.lang.String> initialLocations)
init
public void init()
throws InvalidTaskException
- Description copied from interface:
Droid
- Initialize the queue. Can have different implementation but the main groups
normally are
- add only one url, from which we then start crawling
- add an array of start urls and then crawl them
- add an array of urls as fixed subset (no further crawling done)
- Throws:
InvalidTaskException
start
public void start()
- Description copied from interface:
Droid
- Invoke an instance of the worker used in the droid
- Specified by:
start in interface Droid<Link>- Overrides:
start in class AbstractDroid<Link>
finished
public void finished()
- Description copied from interface:
Droid
- Invoke when the droid has completed
getNewWorker
public CrawlingWorker getNewWorker()
- Description copied from interface:
Droid
- Ask the droid for a new worker
getProtocolFactory
public ProtocolFactory getProtocolFactory()
setProtocolFactory
public void setProtocolFactory(ProtocolFactory protocolFactory)
getParserFactory
public ParserFactory getParserFactory()
setParserFactory
public void setParserFactory(ParserFactory parserFactory)
getHandlerFactory
public HandlerFactory getHandlerFactory()
setHandlerFactory
public void setHandlerFactory(HandlerFactory handlerFactory)
getFiltersFactory
public URLFiltersFactory getFiltersFactory()
setFiltersFactory
public void setFiltersFactory(URLFiltersFactory filtersFactory)
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2007-2009. All Rights Reserved.