|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.geocoder.ReverseGeocodeProviderAdapter
public abstract class ReverseGeocodeProviderAdapter
Field Summary | |
---|---|
static java.lang.String |
_PROP_isEnabled
|
static long |
DEFAULT_MAX_FAILOVER_SECONDS
|
static long |
MIN_FAILOVER_SECONDS
|
static java.lang.String[] |
PROP_alwaysFast
|
static java.lang.String[] |
PROP_maxFailoverSeconds
|
static java.lang.String |
PROP_ReverseGeocodeProvider_
|
Constructor Summary | |
---|---|
ReverseGeocodeProviderAdapter(java.lang.String name,
java.lang.String key,
RTProperties rtProps)
Constructor |
Method Summary | |
---|---|
protected java.lang.String[] |
_getUserPass()
Parse and return the user name and password |
static void |
_main()
|
java.lang.String |
getAuthorization()
Gets the authorization key of this ReverseGeocodeProvider |
ReverseGeocodeProvider |
getFailoverReverseGeocodeProvider()
Gets the failover ReverseGeocodeProvider |
java.lang.String |
getFailoverReverseGeocodeProviderName()
Gets the failover ReverseGeocodeProvider name |
long |
getMaximumFailoverElapsedSec()
|
java.lang.String |
getName()
Gets the name of this ReverseGeocodeProvider |
protected java.lang.String |
getPassword()
Return authorization password. |
RTProperties |
getProperties()
Gets the properties for this ReverseGeocodeProvider |
abstract ReverseGeocode |
getReverseGeocode(GeoPoint gp,
java.lang.String localeStr,
boolean cache)
Returns the best address for the specified GeoPoint |
protected java.lang.String |
getUsername()
Return authorization username. |
boolean |
hasFailoverReverseGeocodeProvider()
Has a failover ReverseGeocodeProvider |
boolean |
isEnabled()
Returns true if this ReverseGeocodeProvider is enabled |
boolean |
isFastOperation()
Returns true if this operation will take less than about 20ms to complete the returned value is used to determine whether the 'getReverseGeocode' operation should be performed immediately, or lazily (ie. |
protected boolean |
isReverseGeocodeFailoverMode()
Returns true if failover mode is active |
static void |
main(java.lang.String[] args)
|
void |
setAuthorization(java.lang.String key)
Sets the authorization key of this ReverseGeocodeProvider |
void |
setFailoverReverseGeocodeProvider(ReverseGeocodeProvider rgp)
Sets the failover ReverseGeocodeProvider |
void |
setName(java.lang.String name)
Sets the name of this ReverseGeocodeProvider |
void |
setProperties(RTProperties rtProps)
Sets the properties for this ReverseGeocodeProvider |
protected void |
startReverseGeocodeFailoverMode()
Start failover mode (with default timeout) |
protected void |
startReverseGeocodeFailoverMode(long failoverTimeoutSec)
Start failover mode (with specified timeout) |
java.lang.String |
toString()
Returns a String representation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_ReverseGeocodeProvider_
public static final java.lang.String _PROP_isEnabled
public static final java.lang.String[] PROP_alwaysFast
public static final java.lang.String[] PROP_maxFailoverSeconds
public static long DEFAULT_MAX_FAILOVER_SECONDS
public static long MIN_FAILOVER_SECONDS
Constructor Detail |
---|
public ReverseGeocodeProviderAdapter(java.lang.String name, java.lang.String key, RTProperties rtProps)
name
- The name of this reverse-geocode providerkey
- The access key (may be null)rtProps
- The properties (may be null)Method Detail |
---|
public void setName(java.lang.String name)
name
- The name of this reverse-geocode providerpublic java.lang.String getName()
getName
in interface ReverseGeocodeProvider
public void setAuthorization(java.lang.String key)
key
- The key of this reverse-geocode providerpublic java.lang.String getAuthorization()
public void setFailoverReverseGeocodeProvider(ReverseGeocodeProvider rgp)
setFailoverReverseGeocodeProvider
in interface ReverseGeocodeProvider
rgp
- The failover ReverseGeocodeProviderpublic ReverseGeocodeProvider getFailoverReverseGeocodeProvider()
getFailoverReverseGeocodeProvider
in interface ReverseGeocodeProvider
public java.lang.String getFailoverReverseGeocodeProviderName()
public boolean hasFailoverReverseGeocodeProvider()
protected void startReverseGeocodeFailoverMode()
protected void startReverseGeocodeFailoverMode(long failoverTimeoutSec)
failoverTimeoutSec
- The explicit failover timeout, or <= 0 for the default timeout.protected boolean isReverseGeocodeFailoverMode()
protected java.lang.String[] _getUserPass()
protected java.lang.String getUsername()
protected java.lang.String getPassword()
public void setProperties(RTProperties rtProps)
rtProps
- The properties for this reverse-geocode providerpublic RTProperties getProperties()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEnabled()
isEnabled
in interface ReverseGeocodeProvider
public boolean isFastOperation()
ReverseGeocodeProvider
isFastOperation
in interface ReverseGeocodeProvider
public long getMaximumFailoverElapsedSec()
public abstract ReverseGeocode getReverseGeocode(GeoPoint gp, java.lang.String localeStr, boolean cache)
ReverseGeocodeProvider
getReverseGeocode
in interface ReverseGeocodeProvider
public static void _main()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |