public abstract class TileHttpFetcher extends Tile
Tile.TileState
Modifier and Type | Field and Description |
---|---|
protected static org.apache.http.impl.client.DefaultHttpClient |
client |
protected static org.apache.http.impl.conn.PoolingClientConnectionManager |
httpConnectionManager |
protected static long |
MAX_WAIT_TIME_MILLIS |
protected int |
retries |
protected static java.util.Random |
rnd |
protected static java.lang.String |
tileClassId |
id, image, lasErrorMessage, levelOfDetail, MILISECONDS_TO_TILE_MEM_REMOVAL, temporaryTransparencyDetectedOnImageOnDisk, TILE_BASE_CACHE_DIR, TILE_FX_EXTENSION, tileX, tileY, worldX, worldY
Constructor and Description |
---|
TileHttpFetcher(java.lang.Integer levelOfDetail,
java.lang.Integer tileX,
java.lang.Integer tileY,
java.awt.image.BufferedImage image) |
TileHttpFetcher(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
protected void |
createTileImage()
Implement this to generate the tile image.
|
protected abstract java.lang.String |
createTileRequestURL() |
static int |
getMaxLevelOfDetail() |
protected java.util.concurrent.locks.ReentrantLock |
getWaitTimeLock()
This returns null.
|
protected long |
getWaitTimeMillisToSeparateConnections()
This works with
getWaitTimeLock() in order to separate the connections. |
static boolean |
isFetchableOrGenerated() |
protected static boolean |
isInStateForbidden() |
void |
retryLoadingTile()
Will retry to reload the tile if the
Tile.state ==ERROR
Please call this even if you need to override it. |
clearDiskCache, clearDiskCache, dispose, getId, getLasErrorMessage, getLastPaintTimeMillis, getState, getTileFilePath, getTileFilePathFor, getTilesMap, getTileStyleID, getTransparencyToApplyToImage, isBaseOrLayerMap, isShowTileId, loadCache, loadOrCreateTileImage, loadTile, paint, saveTile, setShowTileId, setState, staticPropertiesChanged, testForAlfaOnLoaddImage
protected static java.lang.String tileClassId
protected static java.util.Random rnd
protected static final long MAX_WAIT_TIME_MILLIS
protected int retries
protected static org.apache.http.impl.client.DefaultHttpClient client
protected static org.apache.http.impl.conn.PoolingClientConnectionManager httpConnectionManager
public TileHttpFetcher(java.lang.Integer levelOfDetail, java.lang.Integer tileX, java.lang.Integer tileY, java.awt.image.BufferedImage image) throws java.lang.Exception
java.lang.Exception
public TileHttpFetcher(java.lang.String id) throws java.lang.Exception
id
- java.lang.Exception
public static int getMaxLevelOfDetail()
public void retryLoadingTile()
Tile
Tile.state
==ERROR
Please call this even if you need to override it.retryLoadingTile
in class Tile
protected abstract java.lang.String createTileRequestURL()
protected long getWaitTimeMillisToSeparateConnections()
getWaitTimeLock()
in order to separate the connections.protected java.util.concurrent.locks.ReentrantLock getWaitTimeLock()
ReentrantLock
.protected void createTileImage()
Tile
Tile.state
,
if equal to Tile.TileState.DISPOSING
or
Tile.TileState.FATAL_ERROR
return without processing.createTileImage
in class Tile
public static boolean isFetchableOrGenerated()
protected static boolean isInStateForbidden()
Copyright © 2004-2014 FEUP-LSTS and Neptus developers. All Rights Reserved.