Changeset 13733 in josm for trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
- Timestamp:
- 2018-05-12T14:18:57+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
r13112 r13733 2 2 package org.openstreetmap.josm.data.imagery; 3 3 4 import java.util.Map;5 4 import java.util.concurrent.ThreadPoolExecutor; 6 5 import java.util.concurrent.TimeUnit; … … 27 26 28 27 protected final ICacheAccess<String, BufferedImageCacheEntry> cache; 29 protected final int connectTimeout;30 protected final int readTimeout;31 protected final Map<String, String> headers;32 28 protected final TileLoaderListener listener; 33 29 … … 50 46 51 47 private ThreadPoolExecutor downloadExecutor = DEFAULT_DOWNLOAD_JOB_DISPATCHER; 48 protected final TileJobOptions options; 52 49 53 50 /** 54 51 * Constructor 55 52 * @param listener called when tile loading has finished 56 * @param cache of the cache 57 * @param connectTimeout to remote resource 58 * @param readTimeout to remote resource 59 * @param headers HTTP headers to be sent along with request 53 * @param cache of the cache 54 * @param options tile job options 60 55 */ 61 56 public TMSCachedTileLoader(TileLoaderListener listener, ICacheAccess<String, BufferedImageCacheEntry> cache, 62 int connectTimeout, int readTimeout, Map<String, String> headers) {57 TileJobOptions options) { 63 58 CheckParameterUtil.ensureParameterNotNull(cache, "cache"); 64 59 this.cache = cache; 65 this.connectTimeout = connectTimeout; 66 this.readTimeout = readTimeout; 67 this.headers = headers; 60 this.options = options; 68 61 this.listener = listener; 69 62 } … … 98 91 @Override 99 92 public TileJob createTileLoaderJob(Tile tile) { 100 return new TMSCachedTileLoaderJob(listener, tile, cache, 101 connectTimeout, readTimeout, headers, getDownloadExecutor()); 93 return new TMSCachedTileLoaderJob( 94 listener, 95 tile, 96 cache, 97 options, 98 getDownloadExecutor()); 102 99 } 103 100
Note:
See TracChangeset
for help on using the changeset viewer.