public class BaseCrawler extends Object
| Constructor and Description |
|---|
BaseCrawler(org.eclipse.jetty.util.resource.Resource webfolder) |
BaseCrawler(org.eclipse.jetty.util.resource.Resource webfolder,
String siteExtension) |
BaseCrawler(String siteExtension) |
| Modifier and Type | Method and Description |
|---|---|
com.crawljax.core.CrawlSession |
crawl()
Runs the crawler.
|
com.crawljax.core.CrawlSession |
crawlWith(com.crawljax.core.plugin.Plugin... plugins)
Runs a crawl with the given plugins.
|
com.crawljax.core.configuration.CrawljaxConfiguration |
getConfig() |
protected URL |
getUrl() |
WebServer |
getWebServer() |
protected com.crawljax.core.configuration.CrawljaxConfiguration.CrawljaxConfigurationBuilder |
newCrawlConfigurationBuilder()
Override this method to specify a different configuration.
|
void |
setup()
Starts the webserver, configures crawljax.
|
void |
showWebSite()
This starts the webserver and blocks the thread so you can inspect the site in your browser
manually.
|
public BaseCrawler(String siteExtension)
siteExtension - Assumes the sites are in resources/sites.public BaseCrawler(org.eclipse.jetty.util.resource.Resource webfolder,
String siteExtension)
webfolder - The folder the web site is stored in.siteExtension - The extention of the site. Leave blank or null for no extention.public BaseCrawler(org.eclipse.jetty.util.resource.Resource webfolder)
webfolder - The folder the web site is stored in.public WebServer getWebServer()
public void setup()
crawl(). After this method completes, you can configure the
CrawljaxConfiguration and the CrawljaxConfiguration using
newCrawlConfigurationBuilder();
The CrawljaxConfiguration is configured with
CrawljaxConfiguration#clickDefaultElements().
Exception - When the webserver fails to start.protected com.crawljax.core.configuration.CrawljaxConfiguration.CrawljaxConfigurationBuilder newCrawlConfigurationBuilder()
CrawljaxConfiguration to crawl with.protected URL getUrl()
public com.crawljax.core.configuration.CrawljaxConfiguration getConfig()
public com.crawljax.core.CrawlSession crawl()
throws com.crawljax.core.CrawljaxException
setup() it will do that before it runs.CrawlSession for post-crawl inspection.Exception - When crawljax isn't configured correctly or the webserver fails to stop.com.crawljax.core.CrawljaxExceptionpublic com.crawljax.core.CrawlSession crawlWith(com.crawljax.core.plugin.Plugin... plugins)
plugins - The plugins you want to run with the CrawljaxConfiguration.CrawlSession.crawl()public void showWebSite()
throws Exception
This thread will block once started so you have to stop it manually, once you are done.
Exception - in case the webserver can't startCopyright © 2007-2013. All Rights Reserved.