com.esri.client.local
Class LocalGeocodeService

java.lang.Object
  extended by com.esri.client.local.LocalService
      extended by com.esri.client.local.LocalGeocodeService

public class LocalGeocodeService
extends LocalService

Class representing a geocode service on the LocalServer.


Field Summary
 
Fields inherited from class com.esri.client.local.LocalService
_serviceType, CREATE_SERVICE_FILE_PATH, CREATE_SERVICE_NAME, CREATE_SERVICE_TYPE
 
Constructor Summary
LocalGeocodeService()
          Default constructor; constructs a LocalGeocodeService without any reference to local data.
LocalGeocodeService(String path, String locator)
          Constructs a LocalGeocodeService from a path and a locator name.
 
Method Summary
 String getDescription()
          Get a description for the service.
 String getLocatorName()
          Gets locator name.
 String getPath()
          Gets the path of the locator; typically this is the path to the geocoding package (.gcpk).
 String getUrlGeocodeService()
          Gets the URL to the geocode service.
 void setLocatorName(String locatorName)
          Sets locator name; no locator name is provided, the service starts with the first locator from the locator package.
 void setPath(String path)
          Sets the path to the data; this is typically a path to an geocoding package (.gcpk) on disk.
 LocalServiceStatus start()
          Starts the service on the LocalServer and blocks the application till the service has stopped.
 void startAsync()
          Starts the service on the LocalServer and allows the application to remain responsive while the service is starting.
 
Methods inherited from class com.esri.client.local.LocalService
addLocalServiceStartCompleteListener, addLocalServiceStopCompleteListener, completeStart, deleteService, failStart, failStart, fireLocalServiceStartCompleteEvent, getEndpoints, getError, getStatus, getUrl, removeLocalServiceStartCompleteListener, removeLocalServiceStopCompleteListener, sendRequest, setError, setStatus, startAsyncInner, startInner, stop, stopAsync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalGeocodeService

public LocalGeocodeService()
Default constructor; constructs a LocalGeocodeService without any reference to local data. Call the setPath() method before starting this service.


LocalGeocodeService

public LocalGeocodeService(String path,
                           String locator)
Constructs a LocalGeocodeService from a path and a locator name.

Parameters:
path - Path to data; typically this is the path to a geocoding package (.gcpk).
locator - optional Locator name. If a null or empty locator name is provided, the service starts with the first locator from the locator package.
Method Detail

getUrlGeocodeService

public String getUrlGeocodeService()
Gets the URL to the geocode service.

Returns:
the URL of the geocode service

startAsync

public void startAsync()
Description copied from class: LocalService
Starts the service on the LocalServer and allows the application to remain responsive while the service is starting. Use the addLocalServiceStartCompleteListener(LocalServiceStartCompleteListener) method to listen for the start complete event. Alternatively, use the getStatus() and getError() methods the LocalServiceStatus is STARTED before using the service.

Specified by:
startAsync in class LocalService

start

public LocalServiceStatus start()
Description copied from class: LocalService
Starts the service on the LocalServer and blocks the application till the service has stopped.

Specified by:
start in class LocalService
Returns:
the local service status

getDescription

public String getDescription()
Description copied from class: LocalService
Get a description for the service.

Overrides:
getDescription in class LocalService
Returns:
A description of the service.

getLocatorName

public String getLocatorName()
Gets locator name.

Returns:
Name of locator.

setLocatorName

public void setLocatorName(String locatorName)
Sets locator name; no locator name is provided, the service starts with the first locator from the locator package.

Parameters:
locatorName - The locator name to set.

getPath

public String getPath()
Gets the path of the locator; typically this is the path to the geocoding package (.gcpk).

Returns:
Path to locator.

setPath

public void setPath(String path)
Sets the path to the data; this is typically a path to an geocoding package (.gcpk) on disk. The path may only be set prior to this service being started. The path must be set prior to this service being started. The path can be absolute or relative to your executing application; that is relative to your jar or binaries.

Parameters:
path - Path to the data.


Copyright © 2012. All Rights Reserved.