Interface CrawlEventMount

  • All Implemented Interfaces:
    ai.platon.pulsar.skeleton.plugin.PluginMount

    
    public interface CrawlEventMount
     implements PluginMount
                        

    Mount point for crawl-phase event handlers.

    The PluginManager calls configureCrawlHandlers with the active CrawlEventHandlers chain, allowing the plugin to register handlers on any crawl-phase hook:

    • onWillLoad — before URL enters the load/browse pipeline (can reject URLs)

    • onLoaded — after pipeline completes (results available)

    class UrlFilterPlugin : CrawlEventMount {
        override fun configureCrawlHandlers(handlers: CrawlEventHandlers) {
            handlers.onWillLoad.addLast { url ->
                if (isBlacklisted(url.url)) null else url  // reject blacklisted
            }
        }
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit configureCrawlHandlers(CrawlEventHandlers handlers) Called by PluginManager to let this plugin register handlers on any crawl-phase event hook.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • configureCrawlHandlers

         abstract Unit configureCrawlHandlers(CrawlEventHandlers handlers)

        Called by PluginManager to let this plugin register handlers on any crawl-phase event hook.

        Parameters:
        handlers - the active crawl event handlers chain (never null at call time)