public abstract class BoundsDownloadRunnable extends java.lang.Object implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected org.openstreetmap.josm.data.Bounds |
bounds |
(package private) static org.apache.log4j.Logger |
logger |
| Constructor and Description |
|---|
BoundsDownloadRunnable(org.openstreetmap.josm.data.Bounds bounds) |
| 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) |
static final org.apache.log4j.Logger logger
protected org.openstreetmap.josm.data.Bounds bounds
public BoundsDownloadRunnable(org.openstreetmap.josm.data.Bounds bounds)
protected abstract java.util.function.Function<org.openstreetmap.josm.data.Bounds,java.net.URL> getUrlGenerator()
public void run()
run in interface java.lang.Runnablepublic static void logConnectionInfo(java.net.URLConnection con, java.lang.String info) throws java.io.IOException
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.con - the URLConnection for which information is loggedinfo - an additional info text, which is appended to the output in bracesjava.io.IOException - if HttpURLConnection.getResponseCode() throws an IOExceptionpublic abstract void run(java.net.URLConnection connection) throws java.io.IOException
java.io.IOException