|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.veriplace.client.LocationOptions
public class LocationOptions
Specifies optional parameters for a location request. These can include the following:
LocationMode name. LocationFilter which will be applied to all returned
locations or position errors. TransportException. This has no
effect on asynchronous requests.
LocationOptions may be configured globally for the application in the client
configuration (see ClientConfiguration.setLocationOptions(LocationOptions));
some of these can also be set in a properties file using property names
defined by DefaultClientFactory. For
any given GetLocationAPI request that takes a LocationOptions reference, if
that reference is null or if one of the object's properties has not been set,
the corresponding property from the global configuration will be used
instead.
GetLocationAPI.getLocation(com.veriplace.oauth.consumer.Token, User),
GetLocationAPI.requestLocation(com.veriplace.oauth.consumer.Token, User, String, String)| Nested Class Summary | |
|---|---|
static class |
LocationOptions.ExtraInfo
Enumeration of extended location data structures that can be requested. |
| Constructor Summary | |
|---|---|
LocationOptions()
Creates a new LocationOptions object with no properties overridden. |
|
| Method Summary | |
|---|---|
LocationOptions |
addExtraInfo(LocationOptions.ExtraInfo... extraInfo)
Adds a set of desired LocationOptions.ExtraInfo options to the previously
specified options. |
LocationOptions |
addFilter(LocationFilter locationFilter)
Deprecated. |
LocationOptions |
addMode(java.lang.String locationMode)
Deprecated. |
LocationOptions |
addTimeout(java.lang.Integer timeoutMilliseconds)
Deprecated. |
LocationOptions |
clone()
Returns an exact copy of the LocationOptions object. |
LocationOptions.ExtraInfo[] |
getExtraInfo()
Returns an array of all the LocationOptions.ExtraInfo options that have been set
on this LocationOptions instance. |
LocationFilter |
getLocationFilter()
|
java.lang.String |
getLocationMode()
|
java.lang.Integer |
getTimeoutMilliseconds()
|
boolean |
hasExtraInfo(LocationOptions.ExtraInfo extraInfo)
Returns true if the specified LocationOptions.ExtraInfo option has been set. |
boolean |
isSuppressCachedPosition()
|
LocationOptions |
setExtraInfo(LocationOptions.ExtraInfo... extraInfo)
|
LocationOptions |
setLocationFilter(LocationFilter locationFilter)
Specifies a LocationFilter to be applied to the result of the
location request, or null for no filter. |
LocationOptions |
setLocationMode(java.lang.String locationMode)
Specifies the desired LocationMode, or null to use the default
mode. |
LocationOptions |
setSuppressCachedPosition(boolean suppressCachedPosition)
Setting this property to true tells Veriplace not to return a cached position if there is a PositionFailureException. |
LocationOptions |
setTimeoutMilliseconds(java.lang.Integer timeoutMilliseconds)
Specifies the timeout interval, or null for no timeout. |
static LocationOptions |
withExtraInfo(LocationOptions.ExtraInfo... extraInfo)
Returns a LocationOptions object specifying any number of desired LocationOptions.ExtraInfo types, with no other overridden properties. |
static LocationOptions |
withFilter(LocationFilter filter)
Returns a LocationOptions object specifying a LocationFilter, with
no other overridden properties. |
static LocationOptions |
withMode(java.lang.String locationMode)
Returns a LocationOptions object specifying a LocationMode, with
no other overridden properties. |
static LocationOptions |
withTimeout(java.lang.Integer timeoutMilliseconds)
Returns a LocationOptions object specifying a timeout interval, with no other overridden properties. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocationOptions()
| Method Detail |
|---|
public LocationOptions.ExtraInfo[] getExtraInfo()
LocationOptions.ExtraInfo options that have been set
on this LocationOptions instance.
public boolean hasExtraInfo(LocationOptions.ExtraInfo extraInfo)
LocationOptions.ExtraInfo option has been set.
public LocationOptions setExtraInfo(LocationOptions.ExtraInfo... extraInfo)
extraInfo - any number of LocationOptions.ExtraInfo constants
LocationOptions instance.public LocationFilter getLocationFilter()
setLocationFilter(LocationFilter)public LocationOptions setLocationFilter(LocationFilter locationFilter)
LocationFilter to be applied to the result of the
location request, or null for no filter.
LocationOptions instance.public java.lang.String getLocationMode()
setLocationMode(String)public LocationOptions setLocationMode(java.lang.String locationMode)
LocationMode, or null to use the default
mode.
LocationOptions instance.public java.lang.Integer getTimeoutMilliseconds()
setTimeoutMilliseconds(Integer)public LocationOptions setTimeoutMilliseconds(java.lang.Integer timeoutMilliseconds)
If a synchronous location request takes longer than the specified timeout
interval, it will fail with a TransportException.
LocationOptions instance.public boolean isSuppressCachedPosition()
setSuppressCachedPosition(boolean)public LocationOptions setSuppressCachedPosition(boolean suppressCachedPosition)
PositionFailureException. By
default, Veriplace will return a cached position if one is available.
LocationOptions instance.public static LocationOptions withExtraInfo(LocationOptions.ExtraInfo... extraInfo)
LocationOptions.ExtraInfo types, with no other overridden properties.
public static LocationOptions withFilter(LocationFilter filter)
LocationFilter, with
no other overridden properties.
public static LocationOptions withMode(java.lang.String locationMode)
LocationMode, with
no other overridden properties.
public static LocationOptions withTimeout(java.lang.Integer timeoutMilliseconds)
public LocationOptions addExtraInfo(LocationOptions.ExtraInfo... extraInfo)
LocationOptions.ExtraInfo options to the previously
specified options.
public LocationOptions addFilter(LocationFilter locationFilter)
LocationFilter to the previously specified options,
returning a new instance.
public LocationOptions addMode(java.lang.String locationMode)
LocationMode to the previously specified options,
returning a new instance.
public LocationOptions addTimeout(java.lang.Integer timeoutMilliseconds)
public LocationOptions clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||