edu.ntnu.ecosim.management
Class SimulationManager

java.lang.Object
  extended by java.util.Observable
      extended by edu.ntnu.ecosim.management.SimulationManager
All Implemented Interfaces:
java.lang.Runnable

public class SimulationManager
extends java.util.Observable
implements java.lang.Runnable

The Class SimulationManager. This is a controll class which binds the environment layer and the communication interface layer. The simulation manager is responsible for setting up the simulation, and for sending temporary- and final results.


Constructor Summary
SimulationManager()
          The Constructor.
 
Method Summary
 void reset()
          Method to reset the simulation.
 void run()
           
 void sendErrorMessage(java.lang.String msg)
          Send error message to the application using the simulator
 void sendFinalResultsXML()
          Send final results as a XML document.
 void sendInfoMessage(java.lang.String info)
          Send information message as XML document
 void sendTemporaryResultsXML(java.lang.String time)
          Send temporary results as XML document.
 void setupEnvironment(org.w3c.dom.Document setup)
          Setup the environment.
 void startSimulation()
          Start the simulation.
 void stopSimulation()
          Stop the simulation.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationManager

public SimulationManager()
The Constructor.

Method Detail

reset

public void reset()
Method to reset the simulation.


run

public void run()
Specified by:
run in interface java.lang.Runnable

sendErrorMessage

public void sendErrorMessage(java.lang.String msg)
Send error message to the application using the simulator

Parameters:
msg - the message to send

sendFinalResultsXML

public void sendFinalResultsXML()
Send final results as a XML document.


sendTemporaryResultsXML

public void sendTemporaryResultsXML(java.lang.String time)
Send temporary results as XML document.

Parameters:
time - the current time of the simulation

sendInfoMessage

public void sendInfoMessage(java.lang.String info)
Send information message as XML document

Parameters:
info - the information to send

setupEnvironment

public void setupEnvironment(org.w3c.dom.Document setup)
Setup the environment.

Parameters:
setup - the document containing information about the simulation

startSimulation

public void startSimulation()
Start the simulation.


stopSimulation

public void stopSimulation()
Stop the simulation.