|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.veriplace.client.AsyncRequestStatus
com.veriplace.client.LocationRequestStatus
public class LocationRequestStatus
Holds information about the status of an asynchronous GetLocationAPI
request.
| Constructor Summary | |
|---|---|
LocationRequestStatus(java.lang.String id,
User user)
|
|
LocationRequestStatus(java.lang.String id,
User user,
java.lang.Long locationId)
|
|
LocationRequestStatus(java.lang.String id,
User user,
java.lang.String mobileNumber)
|
|
LocationRequestStatus(java.lang.String id,
User user,
java.lang.String mobileNumber,
GetLocationException exception)
|
|
LocationRequestStatus(java.lang.String id,
User user,
java.lang.String mobileNumber,
Location location)
|
|
| Method Summary | |
|---|---|
GetLocationException |
getException()
A PositionFailureException indicating the reason that the
location could not be obtained, and possibly including a recent cached
location. |
Location |
getLocation()
The requested location, if the request has successfully completed and if the location details were included in the response. |
java.lang.Long |
getLocationId()
The unique identifier of the requested location, if the request has successfully completed. |
java.lang.String |
getMobileNumber()
The mobile number of the Veriplace user whose location was requested. |
User |
getUser()
The Veriplace user identifier for the user whose location was requested. |
| Methods inherited from class com.veriplace.client.AsyncRequestStatus |
|---|
getId, isFailed, isReady |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocationRequestStatus(java.lang.String id,
User user)
public LocationRequestStatus(java.lang.String id,
User user,
java.lang.String mobileNumber)
public LocationRequestStatus(java.lang.String id,
User user,
java.lang.String mobileNumber,
Location location)
public LocationRequestStatus(java.lang.String id,
User user,
java.lang.Long locationId)
public LocationRequestStatus(java.lang.String id,
User user,
java.lang.String mobileNumber,
GetLocationException exception)
| Method Detail |
|---|
public Location getLocation()
The location details are included if you queried the result with
GetLocationAPI.getResult(LocationRequestStatus), or if you used
an extended callback - see CallbackOptions. If you used a summary
callback (CallbackOptions.createSummaryCallback(String), then this
property will be null and only getLocationId() will be available.
public java.lang.Long getLocationId()
If the location details were not included in the response (i.e. if
getLocation() returns null), you can pass the location ID to
GetLocationAPI.getLocationById(com.veriplace.oauth.consumer.Token, User, long)
to retrieve the location details.
public User getUser()
public java.lang.String getMobileNumber()
This property is provided in callback messages for convenience (in case
your callback-processing logic prefers to use mobile numbers rather than
Veriplace user IDs), but it is only provided if you used the extended
callback format (see CallbackOptions) or if you queried the result
with GetLocationAPI.getResult(LocationRequestStatus). If you used
a summary callback, then this property will be null.
public GetLocationException getException()
PositionFailureException indicating the reason that the
location could not be obtained, and possibly including a recent cached
location. This will be present if the request itself was valid, but the
device was not locatable at present.
getException in class AsyncRequestStatus
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||