jasi.sim.basic.control
Interface SimListener

All Superinterfaces:
CalendarListener, ElementsListener
All Known Subinterfaces:
SimController
All Known Implementing Classes:
AbstractSimController, AbstractSimListener, BasicController, BasicOutput, Timer

public interface SimListener
extends ElementsListener, CalendarListener

Interface for an observer/listener of simulation state changes. This interface can be used to organize the simulation output into databases, federation, GUIs, monitors, etc. Every change in the state of the simulation is sent to all registered simulation observers.


Method Summary
 void advancedTime(Time time, double speed)
          A time advance has been granted.
 void finishedReadingArchive()
          The simulation archive was read.
 void finishedSimulation(Time time)
          A simulation thread has been finished.
 void finishedWritingArchive()
          The simulation archive was written.
 void gotException(java.lang.Exception e)
          An exception occurred during simulation.
 void gotMessage(java.lang.String m)
          An message was created by the simulation.
 void startedSimulation(Time time)
          A simulation thread has been started.
 void startReadingArchive(java.lang.String file)
          The simulation archive is read.
 void startWritingArchive(java.lang.String file)
          The simulation archive is written.
 
Methods inherited from interface jasi.sim.basic.element.ElementsListener
changedElement, createdElement, deletedElement, requestedElement
 
Methods inherited from interface jasi.sim.basic.event.CalendarListener
poppedEvent, pushedEvent, removedEvent
 

Method Detail

startedSimulation

void startedSimulation(Time time)
A simulation thread has been started.

Parameters:
time - The current time.

finishedSimulation

void finishedSimulation(Time time)
A simulation thread has been finished.

Parameters:
time - The current time.

advancedTime

void advancedTime(Time time,
                  double speed)
A time advance has been granted.

Parameters:
time - The granted time advance.
speed - The simulation speed in factors of real time.

startReadingArchive

void startReadingArchive(java.lang.String file)
The simulation archive is read.

Parameters:
file - The file name of the archive.

finishedReadingArchive

void finishedReadingArchive()
The simulation archive was read.


startWritingArchive

void startWritingArchive(java.lang.String file)
The simulation archive is written.

Parameters:
file - The file name of the archive.

finishedWritingArchive

void finishedWritingArchive()
The simulation archive was written.


gotException

void gotException(java.lang.Exception e)
An exception occurred during simulation.

Parameters:
e - The exception.

gotMessage

void gotMessage(java.lang.String m)
An message was created by the simulation.

Parameters:
m - The message.