Interface PluggableCrawler
- All Known Implementing Classes:
CmdLineCrawler,WgetCmdLineCrawler
public interface PluggableCrawler
An interface to defines the basic functions of a pluggable crawler
-
Method Summary
Modifier and TypeMethodDescriptionvoidStop all crawls and clear the crawl queue managed by this crawlervoiddisable(boolean abortCrawling) disable this crawler clearing any queued crawls.Get a Crawl for a given crawl id.Return the configuration for this crawlerReturn the unique Id for this crawler.booleanis this crawler enabledrequestCrawl(org.lockss.plugin.ArchivalUnit au, org.lockss.util.rest.crawler.CrawlJob crawlJob) voidsetPluggableCrawlManager(PluggableCrawlManager pluggableCrawlManager) Set the Crawl Manager which created and maintains this crawler.voidshutdown()Shutdown the crawler.Stop a crawl a specific crawlvoidupdateCrawlerConfig(CrawlerConfig crawlerConfig) set the configuration parameters for this crawler
-
Method Details
-
getCrawlerId
String getCrawlerId()Return the unique Id for this crawler.- Returns:
- the id of the crawler
-
updateCrawlerConfig
set the configuration parameters for this crawler- Parameters:
crawlerConfig- the configuration parameters to use
-
getCrawlerConfig
CrawlerConfig getCrawlerConfig()Return the configuration for this crawler- Returns:
- the configuration parameters in use by this crawler.
-
requestCrawl
PluggableCrawl requestCrawl(org.lockss.plugin.ArchivalUnit au, org.lockss.util.rest.crawler.CrawlJob crawlJob) -
stopCrawl
Stop a crawl a specific crawl- Parameters:
crawlId- The crawl id of the crawl to stop- Returns:
- The PluggableCrawl containing the results of this crawl attempt.
-
getCrawl
Get a Crawl for a given crawl id.- Parameters:
crawlId- The crawl id of the crawl to stop- Returns:
- The PluggableCrawl that matches a crawl id.
-
deleteAllCrawls
void deleteAllCrawls()Stop all crawls and clear the crawl queue managed by this crawler -
isCrawlerEnabled
boolean isCrawlerEnabled()is this crawler enabled- Returns:
- true if this crawler is set to enabled.
-
shutdown
void shutdown()Shutdown the crawler. -
disable
void disable(boolean abortCrawling) disable this crawler clearing any queued crawls. if the crawler was running is now marked as disabled or is missing from the supported crawler ids in the configuration- Parameters:
abortCrawling- abort the currently running crawls.
-
setPluggableCrawlManager
Set the Crawl Manager which created and maintains this crawler.- Parameters:
pluggableCrawlManager-
-