com.veriplace.client
Class PositionFailureException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.veriplace.client.VeriplaceException
              extended by com.veriplace.client.RequestDeniedException
                  extended by com.veriplace.client.GetLocationException
                      extended by com.veriplace.client.PositionFailureException
All Implemented Interfaces:
java.io.Serializable

public class PositionFailureException
extends GetLocationException

Thrown to indicate that a GetLocationAPI method failed because Veriplace could not obtain the user's location, although your request was valid.

Position failures are classified by a numeric code and may return cached location data from a previous request.

Since:
2.0
See Also:
Serialized Form

Field Summary
static int POSITION_DETERMINATION_TEMPORARILY_UNAVAILABLE
          Error code for position determination being termporarily unavailable, for example if a carrier's infrastructure is undergoing maintenance.
static int POSITION_FAILURE
          Error code for location being unavailable, for example if the device is powered off or out of network coverage.
static int RESTRICTED
          Error code for position data being restricted by a user privacy setting.
 
Constructor Summary
PositionFailureException(java.lang.String message, int code, Location cachedLocation)
           
 
Method Summary
 Location getCachedLocation()
           
 int getCode()
           
 boolean isPositionDeterminationTemporarilyUnavailable()
           
 boolean isPositionFailure()
           
 boolean isRestricted()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

POSITION_FAILURE

public static final int POSITION_FAILURE
Error code for location being unavailable, for example if the device is powered off or out of network coverage.

See Also:
Constant Field Values

POSITION_DETERMINATION_TEMPORARILY_UNAVAILABLE

public static final int POSITION_DETERMINATION_TEMPORARILY_UNAVAILABLE
Error code for position determination being termporarily unavailable, for example if a carrier's infrastructure is undergoing maintenance.

See Also:
Constant Field Values

RESTRICTED

public static final int RESTRICTED
Error code for position data being restricted by a user privacy setting.

See Also:
Constant Field Values
Constructor Detail

PositionFailureException

public PositionFailureException(java.lang.String message,
                                int code,
                                Location cachedLocation)
Method Detail

getCode

public int getCode()

isPositionFailure

public boolean isPositionFailure()

isPositionDeterminationTemporarilyUnavailable

public boolean isPositionDeterminationTemporarilyUnavailable()

isRestricted

public boolean isRestricted()

getCachedLocation

public Location getCachedLocation()