|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ohf.stem.jobs.simulation.SimulationManager
public class SimulationManager
This class manages the life-cycle of active simulations. There is a singleton
instance of the manager that is referenced by other parts of the system to
manage simulations. It creates Simulation
instances from
Scenario
instances and can obtain Scenario
instances from
file URI's or from IConfigurationElement
's. It maintains a
collection of all of the active simulations in the system and generates
SimulationEvent
's whenever a simulation is added to that collection
or removed.
The simulation manager maintains a sequence number and assigns successive
values of that number to the Simulation
instances it creates.
Field Summary | |
---|---|
static ISimulation[] |
NONE
Constant empty array. |
Method Summary | |
---|---|
void |
addSimulationManagerListener(ISimulationManagerListener listener)
|
void |
createAndRunSimulation(org.eclipse.core.runtime.IConfigurationElement configurationElement)
Create a simulation from a Configuration Element and then start it running. |
void |
createAndRunSimulation(Scenario scenario)
Create a simulation from a scenario instance and then start it running. |
void |
createAndStepSimulation(org.eclipse.core.runtime.IConfigurationElement configurationElement)
Create a simulation from a Configuration Element and then start it running. |
void |
createAndStepSimulation(Scenario scenario)
Create a simulation from a scenario instance and then start it running. |
ISimulation |
createSimulation(org.eclipse.core.runtime.IConfigurationElement configurationElement,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create a Simulation that's ready to run. |
ISimulation |
createSimulation(Scenario scenario)
Create a Simulation from a Scenario instance. |
ISimulation |
createSimulation(org.eclipse.emf.common.util.URI scenarioURI,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create a Simulation that's ready to run. |
java.util.List<ISimulation> |
getActiveSimulations()
|
static SimulationManager |
getManager()
|
void |
removeListener(ISimulationManagerListener listener)
|
static void |
resetSimulationManager()
This is used for testing purposes to reset the state of the model. |
void |
simulationChanged(SimulationEvent event)
This is where the manager hears about changes in the simulations it is managing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ISimulation[] NONE
Method Detail |
---|
public static final SimulationManager getManager()
public static final void resetSimulationManager()
public final java.util.List<ISimulation> getActiveSimulations()
public ISimulation createSimulation(org.eclipse.core.runtime.IConfigurationElement configurationElement, org.eclipse.core.runtime.IProgressMonitor monitor)
configurationElement
- a configuration element that specifies the details of a
serialized scenario that is in a plug-inmonitor
- a progress monitor
public ISimulation createSimulation(org.eclipse.emf.common.util.URI scenarioURI, org.eclipse.core.runtime.IProgressMonitor monitor)
scenarioURI
- the URI of a serialized Senariomonitor
- a progress monitor
public ISimulation createSimulation(Scenario scenario)
scenario
- the Scenario to simulate
public void createAndRunSimulation(org.eclipse.core.runtime.IConfigurationElement configurationElement)
configurationElement
- a configuration element that specifies the details of a
serialized scenario that is in a plug-inpublic void createAndRunSimulation(Scenario scenario)
scenario
- the scenario to be simulatedpublic void createAndStepSimulation(org.eclipse.core.runtime.IConfigurationElement configurationElement)
configurationElement
- a configuration element that specifies the details of a
serialized scenario that is in a plug-inpublic void createAndStepSimulation(Scenario scenario)
scenario
- the scenario to be simulatedpublic void addSimulationManagerListener(ISimulationManagerListener listener)
listener
- a listener wanting to be told about changes to the manager.public void removeListener(ISimulationManagerListener listener)
listener
- a listener wanting NOT to be told about changes to the
manager.public void simulationChanged(SimulationEvent event)
simulationChanged
in interface ISimulationListener
event
- the event that records what happened to the simulation.ISimulationListener.simulationChanged(org.eclipse.ohf.stem.jobs.simulation.SimulationEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |