|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.uka.ipd.sdq.simucomframework.AbstractMain
public abstract class AbstractMain
Base class for simulation instances. It contains a generic simulation start and stop logic as well as basic error handling mechanisms. The code generated for each SimuCom instance contains the class main.SimuComControl that inherits from this one and provides the missing information. Excerpt from main.SimuComControl: public class SimuComControl extends de.uka.ipd.sdq.simucomframework.AbstractMain
| Constructor Summary | |
|---|---|
AbstractMain()
|
|
| Method Summary | |
|---|---|
Throwable |
getErrorThrowable()
Returns an exception which caused the simulation to terminate in case of simulation errors as indicated by the SimuComResult returned by the startSimulation method |
protected SimuComModel |
getModel()
|
protected abstract IResourceContainerFactory |
getResourceContainerFactory()
Template method to return a factory which can be used to instanciate the simulated resource environment. |
SimuComStatus |
getStatus()
Retrieve an object containing the status of this simulation. |
protected abstract IWorkloadDriver[] |
getWorkloads()
Template method pattern. |
protected SimuComResult |
run(IStatusObserver statusObserver,
SimuComConfig config,
boolean isRemoteRun)
Run a simulation using the given configuration and report to the given observer |
void |
start(org.osgi.framework.BundleContext context)
|
SimuComResult |
startSimulation(SimuComConfig config,
IStatusObserver observer,
boolean isRemoteRun)
Start a simulation run |
protected void |
stop()
Request a simulation stop |
void |
stop(org.osgi.framework.BundleContext context)
|
void |
stopSimulation()
Cancels a running simulation by disallowing the generation of new simulation events |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractMain()
| Method Detail |
|---|
public void start(org.osgi.framework.BundleContext context)
throws Exception
Exception
public void stop(org.osgi.framework.BundleContext context)
throws Exception
Exception
protected SimuComResult run(IStatusObserver statusObserver,
SimuComConfig config,
boolean isRemoteRun)
statusObserver - Observer to notify about the simulation's progressconfig - Configuration options for the simulationisRemoteRun - True if this simulation runs remotely and has no access to the local sensorframework
protected void stop()
protected SimuComModel getModel()
public Throwable getErrorThrowable()
ISimuComControlSimuComResult returned by the startSimulation method
getErrorThrowable in interface ISimuComControl
public SimuComResult startSimulation(SimuComConfig config,
IStatusObserver observer,
boolean isRemoteRun)
ISimuComControl
startSimulation in interface ISimuComControlconfig - The configuration object which sets many simulation parameters like stop conditions, storage location, etc.observer - An observer which gets notifications on the simulation progressisRemoteRun - If true, the simulation uses an own, temporary result store instead of the sensorfactory
storage passed in the simulation parameter object. Use this for remote simulation docks which do not have access to the
local sensor factory storages
public void stopSimulation()
ISimuComControl
stopSimulation in interface ISimuComControlprotected abstract IWorkloadDriver[] getWorkloads()
protected abstract IResourceContainerFactory getResourceContainerFactory()
public SimuComStatus getStatus()
ISimuComControl
getStatus in interface ISimuComControlSimuComStatus object containing the simulation status
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||