com.esri.client.local
Class LocalMapService

java.lang.Object
  extended by com.esri.client.local.LocalService
      extended by com.esri.client.local.LocalMapService
Direct Known Subclasses:
LocalFeatureService

public class LocalMapService
extends LocalService

Class representing a map service on the LocalServer.


Field Summary
protected  String _path
          The _path.
protected  String _urlMapService
          The _url map service.
 
Fields inherited from class com.esri.client.local.LocalService
_serviceType, CREATE_SERVICE_FILE_PATH, CREATE_SERVICE_NAME, CREATE_SERVICE_TYPE
 
Constructor Summary
LocalMapService()
          Default constructor; constructs a LocalMapService without any reference to local data.
LocalMapService(String path)
          Constructs from a path to data; typically this is the path to an MPK.
 
Method Summary
protected  void completeStart()
          Override this to perform any service specific tasks at the end of our initialization process.
protected  CreateServiceInfo generateCreateServiceInfo()
           
 String getDescription()
          Get a description for the service.
 WorkspaceInfoSet getDynamicWorkspaces()
          Gets any dynamic workspaces that have been started with this service.
 boolean getEnableDynamicLayers()
          Gets the enable/disabled state of dynamic layers support.
 List<LayerDetails> getMapLayers()
          Get a list of information on the layers published by this map service.
 int getMaximumRecords()
          Gets the maximum number of records that can be returned.
 String getPath()
          Gets the path to the data on disk; typically this is the path to an MPK.
 String getUrlMapService()
          Gets the URL of the map service.
protected  boolean preStart()
          Pre start.
 void setDynamicWorkspaces(WorkspaceInfoSet workspaceInfos)
          Sets the dynamic workspaces.
 void setEnableDynamicLayers(boolean enable)
          Sets the enable dynamic layers support on or off.
 void setMaximumRecords(int maxRecords)
          Sets the maximum number of records returned by the service and therefore the maximum number of features visible in the map.
 void setPath(String path)
          Sets the path to the data; this is typically a path to an MPK 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, 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
 

Field Detail

_path

protected String _path
The _path.


_urlMapService

protected String _urlMapService
The _url map service.

Constructor Detail

LocalMapService

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


LocalMapService

public LocalMapService(String path)
Constructs from a path to data; typically this is the path to an MPK.

Parameters:
path - Path to data.
Throws:
IOException
Method Detail

getUrlMapService

public String getUrlMapService()
Gets the URL of the map service.

Returns:
URL of the map service

getPath

public String getPath()
Gets the path to the data on disk; typically this is the path to an MPK.

Returns:
the path Path to the data.

setPath

public void setPath(String path)
             throws IOException
Sets the path to the data; this is typically a path to an MPK 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 HTTP, HTTPS, absolute or relative to your executing application; that is relative to your jar or binaries.

Parameters:
path - Path to the data.
Throws:
IOException - when the data cannot be found.

setMaximumRecords

public void setMaximumRecords(int maxRecords)
Sets the maximum number of records returned by the service and therefore the maximum number of features visible in the map. The default value is 1000. This value must be set before the service is started for it to have an effect.

Parameters:
maxRecords - the new max records

getMaximumRecords

public int getMaximumRecords()
Gets the maximum number of records that can be returned.

Returns:
the max records

getEnableDynamicLayers

public boolean getEnableDynamicLayers()
Gets the enable/disabled state of dynamic layers support.

Returns:
true if dynamic layers

setEnableDynamicLayers

public void setEnableDynamicLayers(boolean enable)
Sets the enable dynamic layers support on or off. The method only has effect prior to this service being started.

Parameters:
enable - the new enable dynamic layers

getDynamicWorkspaces

public WorkspaceInfoSet getDynamicWorkspaces()
Gets any dynamic workspaces that have been started with this service.

Returns:
the set of workspace information

setDynamicWorkspaces

public void setDynamicWorkspaces(WorkspaceInfoSet workspaceInfos)
Sets the dynamic workspaces. The method only has effect prior to this service being started.

Parameters:
workspaceInfos - the new dynamic workspaces

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.

getMapLayers

public List<LayerDetails> getMapLayers()
Get a list of information on the layers published by this map service.

Returns:
List of LayerDetails

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

preStart

protected boolean preStart()
Pre start.

Returns:
true, if successful

completeStart

protected void completeStart()
Description copied from class: LocalService
Override this to perform any service specific tasks at the end of our initialization process.

Overrides:
completeStart in class LocalService

generateCreateServiceInfo

protected CreateServiceInfo generateCreateServiceInfo()


Copyright © 2012. All Rights Reserved.