org.openstreetmap.josm.plugins.streetside.io.download

## Class BoundsDownloadRunnable

- java.lang.Object
- - org.openstreetmap.josm.plugins.streetside.io.download.BoundsDownloadRunnable

- All Implemented Interfaces:
    java.lang.Runnable
  Direct Known Subclasses:
    SequenceDownloadRunnable

      public abstract class BoundsDownloadRunnable
      extends java.lang.Object
      implements java.lang.Runnable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.openstreetmap.josm.data.Bounds` | `bounds`
    `(package private) static org.apache.log4j.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoundsDownloadRunnable(org.openstreetmap.josm.data.Bounds bounds)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract java.util.function.Function<org.openstreetmap.josm.data.Bounds,java.net.URL>` | `getUrlGenerator()`
    `static void` | `logConnectionInfo(java.net.URLConnection con, java.lang.String info)` Logs information about the given connection via `logger#info(String)`.
    `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`

- - ### Field Detail

    - #### logger

          static final org.apache.log4j.Logger logger

    - #### bounds

          protected org.openstreetmap.josm.data.Bounds bounds

  - ### Constructor Detail

    - #### BoundsDownloadRunnable

          public BoundsDownloadRunnable(org.openstreetmap.josm.data.Bounds bounds)

  - ### Method Detail

    - #### getUrlGenerator

          protected abstract java.util.function.Function<org.openstreetmap.josm.data.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#info(String)`. 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`

JOSM Plugins