public class GeolocationApiRequest
extends java.lang.Object
PendingResult.Callback<T>
Modifier and Type | Method and Description |
---|---|
GeolocationApiRequest |
AddCellTower(CellTower newCellTower) |
GeolocationApiRequest |
AddWifiAccessPoint(WifiAccessPoint newWifiAccessPoint) |
T |
await()
Performs the request synchronously.
|
T |
awaitIgnoreError()
Performs the request synchronously, ignoring exceptions while performing the request and errors
returned by the server.
|
void |
cancel()
Attempts to cancel the request.
|
GeolocationApiRequest |
Carrier(java.lang.String newCarrier) |
GeolocationApiRequest |
CellTowers(CellTower[] newCellTowers) |
A |
channel(java.lang.String channel)
A channel to pass with the request.
|
GeolocationApiRequest |
ConsiderIp(boolean newConsiderIp) |
GeolocationApiRequest |
CreatePayload() |
A |
custom(java.lang.String parameter,
java.lang.String value)
Custom parameter.
|
GeolocationApiRequest |
HomeMobileCountryCode(int newHomeMobileCountryCode) |
GeolocationApiRequest |
HomeMobileNetworkCode(int newHomeMobileNetworkCode) |
A |
language(java.lang.String language)
The language in which to return results.
|
protected A |
param(java.lang.String key,
int val) |
protected A |
param(java.lang.String key,
java.lang.String val) |
protected A |
param(java.lang.String key,
com.google.maps.internal.StringJoin.UrlValue val) |
protected A |
paramAddToList(java.lang.String key,
java.lang.String val) |
protected A |
paramAddToList(java.lang.String key,
com.google.maps.internal.StringJoin.UrlValue val) |
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
params() |
GeolocationApiRequest |
Payload(GeolocationPayload payload) |
GeolocationApiRequest |
RadioType(java.lang.String newRadioType) |
void |
setCallback(PendingResult.Callback<T> callback)
|
protected void |
validateRequest() |
GeolocationApiRequest |
WifiAccessPoints(WifiAccessPoint[] newWifiAccessPoints) |
protected void validateRequest()
public GeolocationApiRequest HomeMobileCountryCode(int newHomeMobileCountryCode)
public GeolocationApiRequest HomeMobileNetworkCode(int newHomeMobileNetworkCode)
public GeolocationApiRequest RadioType(java.lang.String newRadioType)
public GeolocationApiRequest Carrier(java.lang.String newCarrier)
public GeolocationApiRequest ConsiderIp(boolean newConsiderIp)
public GeolocationApiRequest CellTowers(CellTower[] newCellTowers)
public GeolocationApiRequest AddCellTower(CellTower newCellTower)
public GeolocationApiRequest WifiAccessPoints(WifiAccessPoint[] newWifiAccessPoints)
public GeolocationApiRequest AddWifiAccessPoint(WifiAccessPoint newWifiAccessPoint)
public GeolocationApiRequest Payload(GeolocationPayload payload)
public GeolocationApiRequest CreatePayload()
public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
onResult
or onFailure
after the request has been
completed.setCallback
in interface PendingResult<T>
callback
- The callback to call on completion.public final T await() throws ApiException, java.lang.InterruptedException, java.io.IOException
PendingResult
await
in interface PendingResult<T>
ApiException
- Thrown if the API Returned result is an error.java.lang.InterruptedException
- Thrown when a thread is waiting, sleeping, or otherwise occupied,
and the thread is interrupted.java.io.IOException
- Thrown when an I/O exception of some sort has occurred.public final T awaitIgnoreError()
PendingResult
awaitIgnoreError
in interface PendingResult<T>
public final void cancel()
PendingResult
cancel
in interface PendingResult<T>
protected A param(java.lang.String key, java.lang.String val)
protected A param(java.lang.String key, int val)
protected A param(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
protected A paramAddToList(java.lang.String key, java.lang.String val)
protected A paramAddToList(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> params()
public final A language(java.lang.String language)
language
- The language code, e.g. "en-AU" or "es".public A channel(java.lang.String channel)
channel
- String to pass with the request for analytics.public A custom(java.lang.String parameter, java.lang.String value)
parameter
- The name of the custom parameter.value
- The value of the custom parameter.