Package com.crawljax.core
Class CrawlSession
- java.lang.Object
-
- com.crawljax.core.CrawlSession
-
@Singleton public class CrawlSession extends Object
Contains all data concerned with this crawl. There is oneCrawlSessionper crawl. Even if there are multipleEmbeddedBrowsers configured.
-
-
Field Summary
Fields Modifier and Type Field Description private CrawljaxConfigurationconfigprivate Collection<List<Eventable>>crawlPathsThis ConcurrentLinkedQueue holds all the Paths that are executed during the CrawlSession so far.private FragmentManagerfragmentManagerprivate StateVertexinitialStateprivate static org.slf4j.LoggerLOGGERprivate com.codahale.metrics.MetricRegistryregistryprivate longstartTimeDenote the time the CrawlSession Started in ms since 1970.private StateFlowGraphstateFlowGraph
-
Constructor Summary
Constructors Constructor Description CrawlSession(CrawljaxConfiguration config, FragmentManager fragmentManager, StateFlowGraph stateFlowGraph, StateVertex state, com.codahale.metrics.MetricRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCrawlPath(CrawlPath crawlPath)CrawljaxConfigurationgetConfig()Collection<List<Eventable>>getCrawlPaths()FragmentManagergetFragmentManager()StateVertexgetInitialState()com.codahale.metrics.MetricRegistrygetRegistry()longgetStartTime()StateFlowGraphgetStateFlowGraph()protected voidremoveCrawlPath(List<Eventable> path)Remove the current path from the set of crawlPaths.voidsetFragmentManager(FragmentManager fragmentManager)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
stateFlowGraph
private final StateFlowGraph stateFlowGraph
-
crawlPaths
private final Collection<List<Eventable>> crawlPaths
This ConcurrentLinkedQueue holds all the Paths that are executed during the CrawlSession so far.
-
initialState
private final StateVertex initialState
-
config
private final CrawljaxConfiguration config
-
startTime
private final long startTime
Denote the time the CrawlSession Started in ms since 1970.
-
registry
private final com.codahale.metrics.MetricRegistry registry
-
fragmentManager
private FragmentManager fragmentManager
-
-
Constructor Detail
-
CrawlSession
@Inject public CrawlSession(CrawljaxConfiguration config, FragmentManager fragmentManager, StateFlowGraph stateFlowGraph, StateVertex state, com.codahale.metrics.MetricRegistry registry)
-
-
Method Detail
-
getFragmentManager
public FragmentManager getFragmentManager()
-
setFragmentManager
public void setFragmentManager(FragmentManager fragmentManager)
-
getStateFlowGraph
public StateFlowGraph getStateFlowGraph()
- Returns:
- the stateFlowGraph
-
getCrawlPaths
public Collection<List<Eventable>> getCrawlPaths()
- Returns:
- the crawlPaths
-
addCrawlPath
public void addCrawlPath(CrawlPath crawlPath)
- Parameters:
crawlPath- the eventable list
-
getInitialState
public StateVertex getInitialState()
- Returns:
- the initialState
-
getStartTime
public long getStartTime()
- Returns:
- the startTime
-
removeCrawlPath
protected void removeCrawlPath(List<Eventable> path)
Remove the current path from the set of crawlPaths.- Parameters:
path- the path to be removed
-
getConfig
public CrawljaxConfiguration getConfig()
-
getRegistry
public com.codahale.metrics.MetricRegistry getRegistry()
-
-