|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.client.local.LocalServer
public final class LocalServer
Singleton class representing the LocalServer. The LocalServer must be
licensed with a valid license string prior to attempting to create any
LocalService instances.
It is not necessary to work with the LocalServer
directly. Instead, creating and starting the individual LocalService classes
(LocalMapService
, LocalFeatureService
,
LocalGeocodeService
and LocalGeoprocessingService
) will start
the LocalServer if it is not already running. The LocalServer will
automatically shutdown a short time after your application exits.
The
LocalServer can be controlled directly. Call the isInstallOK()
method to check the
installation on disk. Once the license string has been set the LocalServer
can be started by calling the asynchronous initializeAsync()
method and
listening for the server initialized event
. To determine whether the LocalServer is currently
running use the getStatus()
method or the isInitialized()
method.
Finally, when the LocalServer is no longer required the shutdownAsync()
method can be called to shutdown the LocalServer and recover any resources
being used. Once the LocalServer has shutdown it will trigger the
server shutdown event
.
Method Summary | |
---|---|
void |
addServerLifetimeListener(ServerLifetimeListener listener)
Add a server life time listener. |
void |
addServerMessageListener(ServerMessageListener listener)
Adds a listener for server messages. |
protected void |
fireServerErrorMessageEvent(String message)
Fires a server error message. |
protected void |
fireServerInfoMessageEvent(String message)
Fires a server information message. |
protected void |
fireServerInitializedEvent()
Fires server initialized event. |
protected void |
fireServerShutdownEvent()
Fires server shutdown event. |
String |
getInitializationError()
Gets any initialization errors. |
static LocalServer |
getInstance()
Get the current LocalServer instance. |
Collection<LocalService> |
getServices()
Gets a read only list of local services currently running on the LocalServer. |
LocalServerStatus |
getStatus()
Gets the current LocalServer status. |
LocalServerStatus |
initialize()
Starts up the LocalServer. |
void |
initializeAsync()
Starts up the LocalServer. |
boolean |
isInitialized()
Indicates whether or not the server has been initialized. |
protected boolean |
isLinux()
|
void |
removeServerLifetimeListener(ServerLifetimeListener listener)
Removes a server life time listener. |
void |
removeServerMessageListener(ServerMessageListener listener)
Removes a server message listener. |
LocalServerStatus |
shutdown()
Shuts down the LocalServer. |
void |
shutdownAsync()
Shuts down the LocalServer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void initializeAsync()
add a server lifetime
listener
to determine when initialization is complete and examine any
initialization errors.
public LocalServerStatus initialize()
public void shutdownAsync()
public LocalServerStatus shutdown()
public boolean isInitialized()
public static LocalServer getInstance()
public LocalServerStatus getStatus()
public String getInitializationError()
public Collection<LocalService> getServices()
public void addServerMessageListener(ServerMessageListener listener)
listener
- The listener to add.public void removeServerMessageListener(ServerMessageListener listener)
listener
- The listener to remove.public void addServerLifetimeListener(ServerLifetimeListener listener)
listener
- The listener to add.public void removeServerLifetimeListener(ServerLifetimeListener listener)
listener
- The listener to remove.protected void fireServerInfoMessageEvent(String message)
message
- The message.protected void fireServerErrorMessageEvent(String message)
message
- The error message.protected void fireServerInitializedEvent()
protected void fireServerShutdownEvent()
protected boolean isLinux()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |