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

## Class BoundsDownloadRunnable

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

- All Implemented Interfaces:
    Runnable
  Direct Known Subclasses:
    ImageDetailsDownloadRunnable, SequenceDownloadRunnable

      public abstract class BoundsDownloadRunnable
      extends Object
      implements Runnable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Bounds` | `bounds`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoundsDownloadRunnable(Bounds bounds)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract Function<Bounds,URL>` | `getUrlGenerator()`
    `static void` | `logConnectionInfo(URLConnection con, String info)` Logs information about the given connection via `Logging.info(String)`.
    `void` | `run()`
    `abstract void` | `run(URLConnection connection)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### bounds

          protected Bounds bounds

  - ### Constructor Detail

    - #### BoundsDownloadRunnable

          public BoundsDownloadRunnable(Bounds bounds)

  - ### Method Detail

    - #### getUrlGenerator

          protected abstract Function<Bounds,URL> getUrlGenerator()

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### logConnectionInfo

          public static void logConnectionInfo(URLConnection con,
                                               String info)
                                        throws IOException

      Logs information about the given connection via `Logging.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:
        `IOException` - if `HttpURLConnection.getResponseCode()` throws an `IOException`

    - #### run

          public abstract void run(URLConnection connection)
                            throws IOException

      Throws:
        `IOException`

JOSM Plugins