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
-
-
Constructor Summary
Constructors Constructor Description BoundsDownloadRunnable(Bounds bounds)
-
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 voidlogConnectionInfo(java.net.URLConnection con, java.lang.String info)Logs information about the given connection viaLogger.voidrun()abstract voidrun(java.net.URLConnection connection)
-
-
-
Constructor Detail
-
BoundsDownloadRunnable
public BoundsDownloadRunnable(Bounds bounds)
-
-
Method Detail
-
getUrlGenerator
protected abstract java.util.function.Function<Bounds,java.net.URL> getUrlGenerator()
-
run
public void run()
- Specified by:
runin interfacejava.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 viaLogger. If it's aHttpURLConnection, the request method, the response code and the URL itself are logged. Otherwise only the URL is logged.- Parameters:
con- theURLConnectionfor which information is loggedinfo- an additional info text, which is appended to the output in braces- Throws:
java.io.IOException- ifHttpURLConnection.getResponseCode()throws anIOException
-
run
public abstract void run(java.net.URLConnection connection) throws java.io.IOException
- Throws:
java.io.IOException
-
-