|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.client.local.LocalService
public abstract class LocalService
Class representing a service on the LocalServer.
Field Summary | |
---|---|
protected String |
_serviceType
|
protected static String |
CREATE_SERVICE_FILE_PATH
|
protected static String |
CREATE_SERVICE_NAME
|
protected static String |
CREATE_SERVICE_TYPE
|
Constructor Summary | |
---|---|
LocalService()
|
Method Summary | |
---|---|
void |
addLocalServiceStartCompleteListener(LocalServiceStartCompleteListener listener)
Add a service start complete listener. |
void |
addLocalServiceStopCompleteListener(LocalServiceStopCompleteListener listener)
Add service stop complete listener. |
protected void |
completeStart()
Override this to perform any service specific tasks at the end of our initialization process. |
protected void |
deleteService(String name)
Delete a service. |
protected void |
failStart(com.esri.client.local.LocalServerError response)
Fail start. |
protected void |
failStart(String error)
Fail start. |
protected void |
fireLocalServiceStartCompleteEvent()
|
String |
getDescription()
Get a description for the service. |
Map<String,String> |
getEndpoints()
Gets the end points for the service. |
String |
getError()
Gets any error; for example an error starting the service. |
LocalServiceStatus |
getStatus()
Gets the status of the service. |
protected String |
getUrl()
Get the URL of the service. |
void |
removeLocalServiceStartCompleteListener(LocalServiceStartCompleteListener listener)
Remove service start complete listener. |
void |
removeLocalServiceStopCompleteListener(LocalServiceStopCompleteListener listener)
Remove service stop complete listener. |
protected org.codehaus.jackson.JsonParser |
sendRequest(URL url,
String data)
Sends a request to a URL. |
protected void |
setError(String error)
Set an error for the service. |
void |
setStatus(LocalServiceStatus status)
Set the status of the service. |
abstract LocalServiceStatus |
start()
Starts the service on the LocalServer and blocks the application till the service has stopped. |
abstract void |
startAsync()
Starts the service on the LocalServer and allows the application to remain responsive while the service is starting. |
protected void |
startAsyncInner()
Asynchronous start up. |
protected LocalServiceStatus |
startInner()
|
LocalServiceStatus |
stop()
Stops the service and blocks the application till the service has stopped. |
void |
stopAsync()
Stops the service and allows the application to remain responsive while the service is starting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String CREATE_SERVICE_FILE_PATH
protected static final String CREATE_SERVICE_NAME
protected static final String CREATE_SERVICE_TYPE
protected String _serviceType
Constructor Detail |
---|
public LocalService()
Method Detail |
---|
protected String getUrl()
public String getError()
public Map<String,String> getEndpoints()
protected void setError(String error)
error
- The error message.public LocalServiceStatus getStatus()
public void setStatus(LocalServiceStatus status)
status
- Service status to be set.public String getDescription()
public abstract void startAsync()
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.
public abstract LocalServiceStatus start()
public void stopAsync()
addLocalServiceStopCompleteListener(LocalServiceStopCompleteListener)
method to listen for the stop complete event.
public LocalServiceStatus stop()
public void addLocalServiceStartCompleteListener(LocalServiceStartCompleteListener listener)
listener
- The listener to add.public void removeLocalServiceStartCompleteListener(LocalServiceStartCompleteListener listener)
listener
- The listener to remove.public void addLocalServiceStopCompleteListener(LocalServiceStopCompleteListener listener)
listener
- Listener to add.public void removeLocalServiceStopCompleteListener(LocalServiceStopCompleteListener listener)
listener
- Listener to remove.protected org.codehaus.jackson.JsonParser sendRequest(URL url, String data)
url
- the URLdata
- the data
protected void fireLocalServiceStartCompleteEvent()
protected void failStart(String error)
error
- the errorprotected void failStart(com.esri.client.local.LocalServerError response)
response
- the responseprotected void startAsyncInner()
protected LocalServiceStatus startInner()
protected void deleteService(String name)
name
- the name of the serviceprotected void completeStart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |