|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScenarioManager
The ScenarioManager is the interface between a client (local or remote) and the simulation engine. It manages the setup and the number of repetitions of a model.
A model is identified by its namespace. For each model (simulation is a synonym), depending on the number of runs, several simulation instances may exist at the same time. Each of them gets assigned a unique identifier, the SimulationID. With this identifier a reference to a single simulation instance can be obtained.
A ScenarioManager must always reference a particular model (given by the namespace). The control methods start, stop, pause, resume operate on this particular model.
Method Summary | |
---|---|
void |
clearListeners()
Removes all listeners. |
SimulationID[] |
getInstances()
Gets the simulation ids of the simulations instances currently running for the model. |
ModelState |
getModelState(SimulationID uid)
Returns the current state of a simulation. |
void |
pause()
Pauses the model run by pausing all simulation instances. |
void |
registerSimulationListener(ScenarioListener listener)
Registers a listener. |
void |
resume()
Resumes a model run by resuming all simulation instances. |
void |
shutdown()
Shuts down a model run and all its simulations. |
void |
start()
Starts a model run by starting all simulation instances. |
void |
unregisterSimulationListener(ScenarioListener listener)
Removes a single listener. |
Method Detail |
---|
void start() throws GSimException
GSimException
void clearListeners() throws GSimException
GSimException
SimulationID[] getInstances() throws GSimException
GSimException
ModelState getModelState(SimulationID uid) throws GSimException
uid
- id of the simulation
GSimException
void pause() throws GSimException
GSimException
void registerSimulationListener(ScenarioListener listener) throws GSimException
listener
- the listener
GSimException
void resume() throws GSimException
GSimException
void shutdown() throws GSimException
GSimException
void unregisterSimulationListener(ScenarioListener listener) throws GSimException
listener
- the listener
GSimException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |