public abstract class Collector extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NORCONEX_ASCII
Simple ASCI art of Norconex.
|
Constructor and Description |
---|
Collector(CollectorConfig collectorConfig)
Creates and configure a Collector with the provided
configuration.
|
Collector(CollectorConfig collectorConfig,
EventManager eventManager)
Creates and configure a Collector with the provided
configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
clean() |
protected abstract Crawler |
createCrawler(CrawlerConfig config)
Creates a new crawler instance.
|
protected void |
destroyCollector() |
void |
exportDataStore(Path dir) |
void |
fireStopRequest() |
static Collector |
get() |
CollectorConfig |
getCollectorConfig()
Gets the collector configuration.
|
List<Crawler> |
getCrawlers()
Gets all crawler instances in this collector.
|
EventManager |
getEventManager()
Gets the event manager.
|
String |
getId()
Gets the collector unique identifier.
|
String |
getReleaseVersions() |
CachedStreamFactory |
getStreamFactory() |
Path |
getTempDir() |
String |
getVersion() |
Path |
getWorkDir() |
void |
importDataStore(List<Path> inFiles) |
protected void |
initCollector() |
boolean |
isRunning() |
protected void |
lock() |
void |
start()
Starts all crawlers defined in configuration.
|
void |
stop()
Stops a running instance of this Collector.
|
String |
toString() |
protected void |
unlock() |
public static final String NORCONEX_ASCII
public Collector(CollectorConfig collectorConfig)
collectorConfig
- Collector configurationpublic Collector(CollectorConfig collectorConfig, EventManager eventManager)
collectorConfig
- Collector configurationeventManager
- event managerpublic static Collector get()
public Path getWorkDir()
public Path getTempDir()
public void start()
public void clean()
public void exportDataStore(Path dir)
protected void initCollector()
protected void destroyCollector()
public void fireStopRequest()
public void stop()
public EventManager getEventManager()
protected abstract Crawler createCrawler(CrawlerConfig config)
config
- crawler configurationpublic CachedStreamFactory getStreamFactory()
public CollectorConfig getCollectorConfig()
public String getId()
public List<Crawler> getCrawlers()
public String getVersion()
public String getReleaseVersions()
protected void lock()
protected void unlock()
public boolean isRunning()
Copyright © 2014–2023 Norconex Inc.. All rights reserved.