Interface Parser.LinkReceiver

All Superinterfaces:
Iterable<URI>
All Known Implementing Classes:
HTMLParser.SetLinkReceiver
Enclosing interface:
Parser

public static interface Parser.LinkReceiver
extends Iterable<URI>
A class that can receive URLs discovered during parsing. It may be used to iterate over the URLs found in the current page, but what will be actually returned by the iterator is implementation-dependent.
  • Method Summary

    Modifier and Type Method Description
    void init​(URI responseUrl)
    Initializes this receiver for a new page.
    void link​(URI uri)
    Handles a link.
    void location​(URI location)
    Handles the location defined by headers.
    void metaLocation​(URI location)
    Handles the location defined by a META element.
    void metaRefresh​(URI refresh)
    Handles the refresh defined by a META element.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • location

      void location​(URI location)
      Handles the location defined by headers.
      Parameters:
      location - the location defined by headers.
    • metaLocation

      void metaLocation​(URI location)
      Handles the location defined by a META element.
      Parameters:
      location - the location defined by the META element.
    • metaRefresh

      void metaRefresh​(URI refresh)
      Handles the refresh defined by a META element.
      Parameters:
      refresh - the URL defined by the META element.
    • link

      void link​(URI uri)
      Handles a link.
      Parameters:
      uri - a link discovered during the parsing phase.
    • init

      void init​(URI responseUrl)
      Initializes this receiver for a new page.
      Parameters:
      responseUrl - the URL of the page to be parsed.