public abstract class AbstractTileSource extends java.lang.Object implements TileSource
getDefaultTimeToLive()
method. The value
here will be used as the initial TTL by the TileDownloadLayer
using this
tile source, but applications can change the TTL at any time (refer to
TileDownloadLayer
for details). The default value is set to one day, or
86,400,000 milliseconds. Subclasses should set #defaultTTL
in their constructor to a value that is
appropriate for their tile source.Modifier and Type | Field and Description |
---|---|
protected long |
defaultTimeToLive
The default time-to-live (TTL) for cached tiles (one day, or 86,400,000 milliseconds).
|
protected boolean |
followRedirects |
protected java.lang.String[] |
hostNames |
protected int |
port |
protected java.util.Random |
random |
protected java.lang.String |
referer |
protected int |
timeoutConnect |
protected int |
timeoutRead |
protected java.lang.String |
userAgent |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTileSource(java.lang.String[] hostNames,
int port) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
long |
getDefaultTimeToLive()
Returns the default time-to-live (TTL) for cached tiles.
|
protected java.lang.String |
getHostName() |
java.lang.String |
getReferer() |
int |
getTimeoutConnect() |
int |
getTimeoutRead() |
java.lang.String |
getUserAgent() |
int |
hashCode() |
boolean |
isFollowRedirects() |
void |
setFollowRedirects(boolean followRedirects) |
void |
setReferer(java.lang.String referer) |
void |
setTimeoutConnect(int timeoutConnect) |
void |
setTimeoutRead(int timeoutRead) |
void |
setUserAgent(java.lang.String userAgent) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getParallelRequestsLimit, getTileUrl, getZoomLevelMax, getZoomLevelMin, hasAlpha
protected long defaultTimeToLive
protected boolean followRedirects
protected final java.lang.String[] hostNames
protected final int port
protected final java.util.Random random
protected java.lang.String referer
protected int timeoutConnect
protected int timeoutRead
protected java.lang.String userAgent
protected AbstractTileSource(java.lang.String[] hostNames, int port)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public long getDefaultTimeToLive()
getDefaultTimeToLive
in interface TileSource
protected java.lang.String getHostName()
public java.lang.String getReferer()
getReferer
in interface TileSource
public int getTimeoutConnect()
getTimeoutConnect
in interface TileSource
public int getTimeoutRead()
getTimeoutRead
in interface TileSource
public java.lang.String getUserAgent()
getUserAgent
in interface TileSource
public int hashCode()
hashCode
in class java.lang.Object
public boolean isFollowRedirects()
isFollowRedirects
in interface TileSource
public void setFollowRedirects(boolean followRedirects)
public void setReferer(java.lang.String referer)
public void setTimeoutConnect(int timeoutConnect)
public void setTimeoutRead(int timeoutRead)
public void setUserAgent(java.lang.String userAgent)