Interface ExternalLinkChecker


  • public interface ExternalLinkChecker
    Service that validates external links.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int check​(java.lang.String uri)
      Checks the given uri.
      LinkInfo checkLink​(java.lang.String link, boolean force)
      Checks the given link store in the repository and checks it for validity.
      void checkLinks()
      Walks through the links stored in the repository and checks them for validity if necessary or removes them from the repository if they are no longer used.
    • Method Detail

      • check

        int check​(java.lang.String uri)
           throws java.net.UnknownServiceException,
                  java.net.URISyntaxException,
                  java.net.ConnectException,
                  java.net.NoRouteToHostException,
                  java.net.UnknownHostException,
                  java.io.IOException
        Checks the given uri.
        Parameters:
        uri - the uri to check
        Returns:
        the http status response
        Throws:
        java.net.UnknownServiceException - if the protocol is not supported
        java.net.URISyntaxException - if the uri is malformed
        java.net.ConnectException - if the connect failed
        java.net.NoRouteToHostException - if there is no route to the host
        java.net.UnknownHostException - if the host is unknown
        java.io.IOException - if a general I/O error occured
      • checkLinks

        void checkLinks()
        Walks through the links stored in the repository and checks them for validity if necessary or removes them from the repository if they are no longer used.
      • checkLink

        LinkInfo checkLink​(java.lang.String link,
                           boolean force)
        Checks the given link store in the repository and checks it for validity.
        Parameters:
        link - link to check
        force - if true force a re-check
        Returns:
        the updated link info or null if it was removed.