
public class TileSourcePolicy extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FLAG_NO_BULK
No bulk downloads allowed
|
static int |
FLAG_NO_PREVENTIVE
Don't try to preventively download tiles that aren't currently displayed
|
static int |
FLAG_USER_AGENT_MEANINGFUL
Demands a user agent different from the default value
|
static int |
FLAG_USER_AGENT_NORMALIZED
Uses the "normalized" user agent (package name + version)
|
| Constructor and Description |
|---|
TileSourcePolicy() |
TileSourcePolicy(int pMaxConcurrent,
int pFlags) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsBulkDownload() |
boolean |
acceptsPreventive() |
boolean |
acceptsUserAgent(String pUserAgent) |
long |
computeExpirationTime(HttpURLConnection pHttpURLConnection,
long pNow) |
long |
computeExpirationTime(String pHttpExpiresHeader,
String pHttpCacheControlHeader,
long pNow) |
Long |
getHttpCacheControlDuration(String pHttpCacheControlHeader) |
Long |
getHttpExpiresTime(String pHttpExpiresHeader) |
int |
getMaxConcurrent() |
boolean |
normalizesUserAgent() |
public static final int FLAG_NO_BULK
public static final int FLAG_NO_PREVENTIVE
public static final int FLAG_USER_AGENT_MEANINGFUL
public static final int FLAG_USER_AGENT_NORMALIZED
public TileSourcePolicy()
public TileSourcePolicy(int pMaxConcurrent,
int pFlags)
public int getMaxConcurrent()
public boolean acceptsBulkDownload()
public boolean normalizesUserAgent()
public boolean acceptsPreventive()
public boolean acceptsUserAgent(String pUserAgent)
public Long getHttpExpiresTime(String pHttpExpiresHeader)
TileDownloaderpublic Long getHttpCacheControlDuration(String pHttpCacheControlHeader)
TileDownloaderpublic long computeExpirationTime(String pHttpExpiresHeader, String pHttpCacheControlHeader, long pNow)
TileDownloaderpublic long computeExpirationTime(HttpURLConnection pHttpURLConnection, long pNow)