Class BoundsDownloadRunnable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Bounds bounds  
      (package private) static org.apache.log4j.Logger logger  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.util.function.Function<Bounds,​java.net.URL> getUrlGenerator()  
      static void logConnectionInfo​(java.net.URLConnection con, java.lang.String info)
      Logs information about the given connection via Logger.
      void run()  
      abstract void run​(java.net.URLConnection connection)  
      • Methods inherited from class java.lang.Object

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

      • getUrlGenerator

        protected abstract java.util.function.Function<Bounds,​java.net.URL> getUrlGenerator()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • logConnectionInfo

        public static void logConnectionInfo​(java.net.URLConnection con,
                                             java.lang.String info)
                                      throws java.io.IOException
        Logs information about the given connection via Logger. If it's a HttpURLConnection, the request method, the response code and the URL itself are logged. Otherwise only the URL is logged.
        Parameters:
        con - the URLConnection for which information is logged
        info - an additional info text, which is appended to the output in braces
        Throws:
        java.io.IOException - if HttpURLConnection.getResponseCode() throws an IOException
      • run

        public abstract void run​(java.net.URLConnection connection)
                          throws java.io.IOException
        Throws:
        java.io.IOException