Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.