public class SpiderController extends Object implements SpiderParserListener
Modifier | Constructor and Description |
---|---|
protected |
SpiderController(Spider spider,
List<SpiderParser> customParsers)
Instantiates a new spider controller.
|
Modifier and Type | Method and Description |
---|---|
void |
addFetchFilter(FetchFilter filter)
Adds a new fetch filter to the spider.
|
void |
addParseFilter(ParseFilter filter)
Adds the parse filter to the spider controller.
|
protected void |
addSeed(org.apache.commons.httpclient.URI uri,
String method)
Adds a new seed, if it wasn't already processed.
|
void |
addSpiderParser(SpiderParser parser) |
protected ParseFilter |
getDefaultParseFilter() |
protected LinkedList<FetchFilter> |
getFetchFilters()
Gets the fetch filters used by the spider during the spidering process.
|
protected LinkedList<ParseFilter> |
getParseFilters()
Gets the parses the filters.
|
List<SpiderParser> |
getParsers()
Gets an unmodifiable view of the list of that should be used during the scan.
|
void |
init() |
void |
reset()
Clears the previous process.
|
void |
resourceFound(SpiderResourceFound resourceFound)
Event triggered when a new resource is found.
|
protected void |
setDefaultParseFilter(ParseFilter filter) |
protected SpiderController(Spider spider, List<SpiderParser> customParsers)
spider
- the spidercustomParsers
- the custom spider parsersprotected void addSeed(org.apache.commons.httpclient.URI uri, String method)
uri
- the urimethod
- the http method used for fetching the resourceprotected LinkedList<FetchFilter> getFetchFilters()
public void addFetchFilter(FetchFilter filter)
filter
- the filterprotected LinkedList<ParseFilter> getParseFilters()
public void addParseFilter(ParseFilter filter)
filter
- the filterprotected void setDefaultParseFilter(ParseFilter filter)
protected ParseFilter getDefaultParseFilter()
public void init()
public void reset()
public void resourceFound(SpiderResourceFound resourceFound)
SpiderParserListener
resourceFound
in interface SpiderParserListener
resourceFound
- definition of found spider resourcepublic List<SpiderParser> getParsers()
public void addSpiderParser(SpiderParser parser)