|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.veriplace.client.DefaultLocationFilter
public class DefaultLocationFilter
Default implementation of LocationFilter. Can be configured to pass
location results and errors unchanged, or to suppress errors as long as an
earlier cached location is available.
| Constructor Summary | |
|---|---|
DefaultLocationFilter()
Constructs a DefaultLocationFilter that does no post-processing. |
|
DefaultLocationFilter(boolean useCachedLocation)
Constructs a DefaultLocationFilter that can optionally suppress certain errors if the application would like to use cached locations. |
|
| Method Summary | |
|---|---|
Location |
filterLocation(Location returnedLocation,
PositionFailureException returnedException)
Transforms the result of a location request. |
boolean |
isUseCachedLocation()
Returns true if this filter will returned cached locations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLocationFilter()
public DefaultLocationFilter(boolean useCachedLocation)
PositionFailureException If all of those conditions are true, then your request will return the last known location instead of throwing an exception.
useCachedLocation - true if the filter should return cached locations
in certain cases; false to retain the default unfiltered behavior| Method Detail |
|---|
public Location filterLocation(Location returnedLocation,
PositionFailureException returnedException)
throws GetLocationException
LocationFilter
filterLocation in interface LocationFilterreturnedLocation - the valid location returned by the server, or null if an error occurredreturnedException - the exception that would normally be thrown if an error occurred
GetLocationException - if the location request should failpublic boolean isUseCachedLocation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||