@Singleton public class Plugins extends Object
| Constructor and Description |
|---|
Plugins(CrawljaxConfiguration config,
com.codahale.metrics.MetricRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
int |
hashCode() |
com.google.common.collect.ImmutableSet<String> |
pluginNames() |
boolean |
runDomChangeNotifierPlugins(CrawlerContext context,
StateVertex stateBefore,
Eventable event,
StateVertex stateAfter)
Load and run the DomChangeNotifierPlugin.
|
void |
runOnBrowserCreatedPlugins(EmbeddedBrowser newBrowser)
Load and run the OnBrowserCreatedPlugins, this call has been made from the browserpool when a
new browser has been created and ready to be used by the Crawler.
|
void |
runOnFireEventFailedPlugins(CrawlerContext context,
Eventable eventable,
List<Eventable> path)
Load and run the OnFireEventFailedPlugins, this call has been made from the fireEvent when
the event is not fireable.
|
void |
runOnInvariantViolationPlugins(Invariant invariant,
CrawlerContext context)
Run the OnInvariantViolation plugins when an Invariant is violated.
|
void |
runOnNewStatePlugins(CrawlerContext context,
StateVertex newState)
load and run the OnNewStatePlugins.
|
void |
runOnRevisitStatePlugins(CrawlerContext context,
StateVertex currentState)
load and run the onRevisitStateValidator.
|
void |
runOnUrlLoadPlugins(CrawlerContext context)
load and run the OnUrlLoadPlugins.
|
void |
runPostCrawlingPlugins(CrawlSession session,
ExitNotifier.ExitStatus exitReason)
load and run the postCrawlingPlugins.
|
void |
runPreCrawlingPlugins(CrawljaxConfiguration config)
Run the
PreCrawlingPlugins. |
void |
runPreStateCrawlingPlugins(CrawlerContext context,
com.google.common.collect.ImmutableList<CandidateElement> candidateElements,
StateVertex state)
load and run the PreStateCrawlingPlugins.
|
String |
toString() |
@Inject public Plugins(CrawljaxConfiguration config, com.codahale.metrics.MetricRegistry registry)
public void runOnUrlLoadPlugins(CrawlerContext context)
This method can be called from multiple threads with different CrawlerContext
context - the current CrawlerContext for this crawler.public void runOnNewStatePlugins(CrawlerContext context, StateVertex newState)
This method can be called from multiple threads with different CrawlerContext
context - the current CrawlerContext for this crawler.newState - The new statepublic void runOnInvariantViolationPlugins(Invariant invariant, CrawlerContext context)
invariant - the failed invariantscontext - the current CrawlerContext for this crawler.public void runPostCrawlingPlugins(CrawlSession session, ExitNotifier.ExitStatus exitReason)
exitReason - The reason Crawljax has stopped.session - the current CrawlSession for this crawler.public void runOnRevisitStatePlugins(CrawlerContext context, StateVertex currentState)
context - the current CrawlerContext for this crawler.currentState - the state the 'back tracking' operation is currently inpublic void runPreStateCrawlingPlugins(CrawlerContext context, com.google.common.collect.ImmutableList<CandidateElement> candidateElements, StateVertex state)
context - the current CrawlerContext for this crawler.candidateElements - the elements which crawljax is about to crawlstate - The state being violated.public void runPreCrawlingPlugins(CrawljaxConfiguration config)
PreCrawlingPlugins. No CrawlerContext is available at this stage.config - The given CrawljaxConfiguration.public void runOnFireEventFailedPlugins(CrawlerContext context, Eventable eventable, List<Eventable> path)
eventable - the eventable not able to fire.path - the path TO this eventable.public void runOnBrowserCreatedPlugins(EmbeddedBrowser newBrowser)
newBrowser - the new created browser objectpublic boolean runDomChangeNotifierPlugins(CrawlerContext context, StateVertex stateBefore, Eventable event, StateVertex stateAfter)
Copyright © 2007-2013. All Rights Reserved.