Class ParsableHyperlink

  • All Implemented Interfaces:
    ai.platon.pulsar.common.urls.ComparableUrlAware , ai.platon.pulsar.common.urls.UrlAware , ai.platon.pulsar.skeleton.crawl.common.url.ListenableUrl , kotlin.Comparable

    
    public class ParsableHyperlink
    extends Hyperlink implements ListenableUrl
                        

    A hyperlink that contains a onParse event handler. The onParse event handler will be called when the page is parsed.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ParsableHyperlink(String url, BiConsumer<WebPage, FeaturedDocument> onParse) Java compatible constructor
      ParsableHyperlink(String url, Function2<WebPage, FeaturedDocument, Object> onParse)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      PageEventHandlers getEventHandlers() The PageEvent handlers of this hyperlink.
      Unit setEventHandlers(PageEventHandlers eventHandlers) The PageEvent handlers of this hyperlink.
      final Function2<WebPage, FeaturedDocument, Object> getOnParse() A event handler that will be called when the page is parsed.
      • Methods inherited from class ai.platon.pulsar.common.urls.AbstractUrl

        compareTo, equals, getArgs, getConfiguredUrl, getCountry, getDeadline, getDepth, getDistrict, getHref, getLabel, getLang, getNMaxRetry, getOrder, getPriority, getReferrer, getText, getToURL, getToURLOrNull, getUrl, hashCode, isNil, isPersistable, isStandard, serialize, setArgs, setCountry, setDepth, setDistrict, setHref, setLang, setNMaxRetry, setOrder, setPriority, setReferrer, setText, setUrl, toString
      • Methods inherited from class ai.platon.pulsar.common.urls.Hyperlink

        data, isDefault, serializeTo, toDatum
      • Methods inherited from class java.lang.Object

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

      • ParsableHyperlink

        ParsableHyperlink(String url, BiConsumer<WebPage, FeaturedDocument> onParse)
        Java compatible constructor
      • ParsableHyperlink

        ParsableHyperlink(String url, Function2<WebPage, FeaturedDocument, Object> onParse)