org.apache.any23.plugin.crawler

## Class SharedData

- java.lang.Object
- - org.apache.any23.plugin.crawler.SharedData

-     public class SharedData
      extends Object

  This class hosts shared data structures accessible to all the `DefaultWebCrawler` instances run by the `SiteCrawler`.
  Author:
    Michele Mostarda (mostarda@fbk.eu)

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static SharedData` | `getInstance()`
    `protected Pattern` | `getPattern()`
    `protected String` | `getSeed()`
    `protected void` | `notifyPage(edu.uci.ics.crawler4j.crawler.Page page)` Notifies all listeners that a page has been discovered.
    `protected static void` | `setCrawlData(String seed, Pattern regex, List<CrawlerListener> listeners)` Initializes the crawler data.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          protected static SharedData getInstance()

      Returns:
        the singleton instance.

    - #### setCrawlData

          protected static void setCrawlData(String seed,
                                             Pattern regex,
                                             List<CrawlerListener> listeners)

      Initializes the crawler data.
      Parameters:
        `seed` - crawler seed.
        `regex` - page filter regex.
        `listeners` - the listeners to be notified of the crawler activity.

    - #### getSeed

          protected String getSeed()

      Returns:
        crawl seed.

    - #### getPattern

          protected Pattern getPattern()

      Returns:
        page filter pattern.

    - #### notifyPage

          protected void notifyPage(edu.uci.ics.crawler4j.crawler.Page page)

      Notifies all listeners that a page has been discovered.
      Parameters:
        `page` - the discovered page.

Copyright © 2010–2019 The Apache Software Foundation. All rights reserved.