public class ServerManager extends com.caucho.hessian.server.HessianServlet implements IServerManager
Constructor and Description |
---|
ServerManager() |
Modifier and Type | Method and Description |
---|---|
void |
close(Ticket ticket)
Shut down the thread associated with the user's ticket.
|
byte[] |
downloadModel(java.lang.String url)
Download the selected model to the client.
|
java.lang.String[] |
getLayoutListing(java.lang.String url)
Get a listing of the layouts for a specific model available on the
server in either the database or the local file system.
|
java.lang.String[] |
getModelListing()
Get a listing of the models available on the server in either the
database or the local file system.
|
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getTokenHandlerMap()
Get the token handlers loaded on the server so that they can be
set up on the client.
|
ProxyModelResponse |
open(java.lang.String modelUrl,
java.lang.String layoutUrl)
Open a model with the provided model URL and wait for the
user to request the execution of the simulation.
|
void |
pause(Ticket ticket)
Pause the execution of the selected simulation.
|
void |
resume(Ticket ticket)
Resume the execution of the selected simulation.
|
void |
start(Ticket ticket)
Start the execution of the selected simulation.
|
void |
stop(Ticket ticket)
Stop the execution of the selected simulation.
|
createHessian2Input, getAPIClass, getContextClassLoader, getSerializerFactory, getServletInfo, init, invoke, service, setAPIClass, setDebug, setHome, setHomeAPI, setLogName, setObject, setObjectAPI, setSendCollectionType, setSerializerFactory, setService
public void close(Ticket ticket) throws IllegalActionException
close
in interface IServerManager
ticket
- Ticket reference to the simulation request.IllegalActionException
- If the server was unable to
destroy the simulation thread.public byte[] downloadModel(java.lang.String url) throws IllegalActionException
downloadModel
in interface IServerManager
url
- URL of the model file.IllegalActionException
- If the server encountered an error opening the model file.public java.lang.String[] getModelListing() throws IllegalActionException
getModelListing
in interface IServerManager
IllegalActionException
- If there was a problem discovering available models.public java.lang.String[] getLayoutListing(java.lang.String url) throws IllegalActionException
getLayoutListing
in interface IServerManager
url
- Address of the model file for which layouts are found.IllegalActionException
- If there was a problem discovering available layouts.public java.util.LinkedHashMap<java.lang.String,java.lang.String> getTokenHandlerMap() throws IllegalActionException
getTokenHandlerMap
in interface IServerManager
IllegalActionException
- If the server was unable to get the handler map.public ProxyModelResponse open(java.lang.String modelUrl, java.lang.String layoutUrl) throws IllegalActionException
open
in interface IServerManager
modelUrl
- The path to the model filelayoutUrl
- The path to a model's layout fileIllegalActionException
- If the model fails to load
from the provided URL.public void pause(Ticket ticket) throws IllegalActionException
pause
in interface IServerManager
ticket
- The ticket reference to the simulation request.IllegalActionException
- If the server was unable to
pause the running simulation.public void resume(Ticket ticket) throws IllegalActionException
resume
in interface IServerManager
ticket
- The ticket reference to the simulation request.IllegalActionException
- If the server was unable to
resume the execution of the simulation.public void start(Ticket ticket) throws IllegalActionException
start
in interface IServerManager
ticket
- The ticket reference to the simulation request.IllegalActionException
- If the server was unable to
start the simulation.public void stop(Ticket ticket) throws IllegalActionException
stop
in interface IServerManager
ticket
- The ticket reference to the simulation request.IllegalActionException
- If the server was unable to
stop the simulation.