org.gsm.oneapi.location
Class Locate

java.lang.Object
  extended by org.gsm.oneapi.location.Locate

public class Locate
extends java.lang.Object


Field Summary
static boolean dumpRequestAndResponse
           
 
Constructor Summary
Locate(ServiceEndpoints endPoints, java.lang.String authorisationHeader)
          Creates a new instance of the Location API main interface.
 
Method Summary
 LocationResponse locateMultipleTerminals(java.lang.String[] endUserId, int requestedAccuracy)
          Locate multiple specified mobile terminals to the specified level of accuracy
 LocationResponse locateTerminal(java.lang.String endUserId, int requestedAccuracy)
          Locate a single specified mobile terminal to the specified level of accuracy
static void main(java.lang.String[] args)
           
 void setAuthorisationHeader(java.lang.String authorisationHeader)
          Can be used to update the service authorisation header
 void setEndpoints(ServiceEndpoints endPoints)
          Can be used to update the service endpoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dumpRequestAndResponse

public static boolean dumpRequestAndResponse
Constructor Detail

Locate

public Locate(ServiceEndpoints endPoints,
              java.lang.String authorisationHeader)
Creates a new instance of the Location API main interface. Requires endPoints to define the URL targets of the terminal location network call and authorisationHeader containing the username/password used for HTTP Basic authorisation with the OneAPI server.

Parameters:
endPoints - contains a set of service/ call specific endpoints
authorisationHeader - Base 64 encoded username/ password
See Also:
ServiceEndpoints, JSONRequest.getAuthorisationHeader(String, String)
Method Detail

setEndpoints

public void setEndpoints(ServiceEndpoints endPoints)
Can be used to update the service endpoints

Parameters:
endPoints - contains a set of service/ call specific endpoints
See Also:
ServiceEndpoints

setAuthorisationHeader

public void setAuthorisationHeader(java.lang.String authorisationHeader)
Can be used to update the service authorisation header

Parameters:
authorisationHeader - Base 64 encoded username/ password
See Also:
JSONRequest.getAuthorisationHeader(String, String)

locateTerminal

public LocationResponse locateTerminal(java.lang.String endUserId,
                                       int requestedAccuracy)
Locate a single specified mobile terminal to the specified level of accuracy

Parameters:
endUserId - The MSISDN or Anonymous Customer Reference of the mobile device to locate. The protocol and Ô+Õ identifier must be used for MSISDN. Do not URL escape prior to passing to the locateTerminal function as this will be done by the API
requestedAccuracy - The preferred accuracy of the result, in metres. Typically, when you request an accurate location it will take longer to retrieve than a coarse location. So requestedAccuracy=10 will take longer than requestedAccuracy=100
See Also:
LocationResponse

locateMultipleTerminals

public LocationResponse locateMultipleTerminals(java.lang.String[] endUserId,
                                                int requestedAccuracy)
Locate multiple specified mobile terminals to the specified level of accuracy

Parameters:
endUserId - The MSISDN or Anonymous Customer Reference of the mobile device to locate. The protocol and Ô+Õ identifier must be used for MSISDN. Do not URL escape prior to passing to the locateMultipleTerminals function as this will be done by the API. Note that if any element of the address array is null it will not be sent to the OneAPI server.
requestedAccuracy - The preferred accuracy of the result, in metres. Typically, when you request an accurate location it will take longer to retrieve than a coarse location. So requestedAccuracy=10 will take longer than requestedAccuracy=100
See Also:
LocationResponse

main

public static void main(java.lang.String[] args)