Interface ScrapingAware

  • All Known Implementing Classes:
    DefaultHandlerHolder

    public interface ScrapingAware
    Interface to be implemented by any object that wishes to be notified of scraping scope possibly it runs in. Currently it is the only solution to receive notification about scope's state changes.
    Since:
    2.1.0-SNAPSHOT
    Version:
    %I%, %G%
    Author:
    Robert Bala
    • Method Detail

      • onBeforeScraping

        void onBeforeScraping​(Harvester harvester)
        Receive notification about new scope initialized for particular Harvester object. This notification is sent just after the scope has been created, but usually before any bean is created as a part of it.
        Parameters:
        harvester - the reference to Harvester for which the scope has been created.
      • onAfterScraping

        void onAfterScraping​(Harvester harvester)
        Receive notification about the scope for particular Harvester that is about to be tore down. This notification is sent just before destroying the scope and its all associated beans.
        Parameters:
        harvester - the reference to Harvester for which the scope is about to be tore down.