public class GeoApiContext
extends java.lang.Object
Constructor and Description |
---|
GeoApiContext() |
Modifier and Type | Method and Description |
---|---|
GeoApiContext |
setApiKey(java.lang.String apiKey) |
GeoApiContext |
setConnectTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets the default connect timeout for new connections.
|
GeoApiContext |
setEnterpriseCredentials(java.lang.String clientId,
java.lang.String cryptographicSecret) |
GeoApiContext |
setProxy(java.net.Proxy proxy)
Sets the proxy for new connections.
|
GeoApiContext |
setQueryRateLimit(int maxQps)
Sets the maximum number of queries that will be executed during a 1 second interval.
|
GeoApiContext |
setQueryRateLimit(int maxQps,
int minimumInterval)
Sets the rate at which queries are executed.
|
GeoApiContext |
setReadTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets the default read timeout for new connections.
|
GeoApiContext |
setRetryTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets the time limit for which retry-able errors will be retried.
|
GeoApiContext |
setWriteTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets the default write timeout for new connections.
|
public GeoApiContext setApiKey(java.lang.String apiKey)
public GeoApiContext setEnterpriseCredentials(java.lang.String clientId, java.lang.String cryptographicSecret)
public GeoApiContext setConnectTimeout(long timeout, java.util.concurrent.TimeUnit unit)
URLConnection.setConnectTimeout(int)
public GeoApiContext setReadTimeout(long timeout, java.util.concurrent.TimeUnit unit)
URLConnection.setReadTimeout(int)
public GeoApiContext setWriteTimeout(long timeout, java.util.concurrent.TimeUnit unit)
public GeoApiContext setRetryTimeout(long timeout, java.util.concurrent.TimeUnit unit)
public GeoApiContext setQueryRateLimit(int maxQps)
maxQps
).public GeoApiContext setQueryRateLimit(int maxQps, int minimumInterval)
maxQps
- The maximum number of queries to execute per second.minimumInterval
- The minimum amount of time, in milliseconds, to pause between requests.
Note that this pause only occurs if the amount of time between requests has not elapsed
naturally.public GeoApiContext setProxy(java.net.Proxy proxy)
proxy
- The proxy to be used by the underlying HTTP client.