Interface PluggableCrawler

All Known Implementing Classes:
CmdLineCrawler, WgetCmdLineCrawler

public interface PluggableCrawler
An interface to defines the basic functions of a pluggable crawler
  • Method Details

    • getCrawlerId

      String getCrawlerId()
      Return the unique Id for this crawler.
      Returns:
      the id of the crawler
    • updateCrawlerConfig

      void updateCrawlerConfig(CrawlerConfig crawlerConfig)
      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

      PluggableCrawl stopCrawl(String crawlId)
      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

      PluggableCrawl getCrawl(String crawlId)
      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

      void setPluggableCrawlManager(PluggableCrawlManager pluggableCrawlManager)
      Set the Crawl Manager which created and maintains this crawler.
      Parameters:
      pluggableCrawlManager -