massim.framework
Class DefaultObserver

java.lang.Object
  extended by massim.framework.DefaultObserver
All Implemented Interfaces:
Component, Observer
Direct Known Subclasses:
BroadcastObserver, GridSimulationVisualizationObserver, ObjectDumperObserver, SimulationStateServerObserver, SimulationVisualizationObserver, XMLDocumentObserver

public class DefaultObserver
extends java.lang.Object
implements Observer

This class serves as a good starting point for simulation observers. It is strongly recommended to extend this class in order to write new observers, by overriding some of the marked methods. Observers in general are classes that are neither supposed to change a simulation in any way. The only thing that they might change is the timing of a simulation. They do only have read-only access.


Constructor Summary
DefaultObserver()
           
 
Method Summary
 void notifySimulationConfiguration(SimulationConfiguration simconf)
           
 void notifySimulationEnd()
           
 void notifySimulationStart()
           
 void notifySimulationState(SimulationState state)
           
 void start()
          Tell the component to start activity.
 void stop()
          Tell the component to cease activity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObserver

public DefaultObserver()
Method Detail

start

public void start()
Description copied from interface: Component
Tell the component to start activity.

Specified by:
start in interface Component

stop

public void stop()
Description copied from interface: Component
Tell the component to cease activity.

Specified by:
stop in interface Component

notifySimulationStart

public void notifySimulationStart()
Specified by:
notifySimulationStart in interface Observer

notifySimulationEnd

public void notifySimulationEnd()
Specified by:
notifySimulationEnd in interface Observer

notifySimulationState

public void notifySimulationState(SimulationState state)
Specified by:
notifySimulationState in interface Observer

notifySimulationConfiguration

public void notifySimulationConfiguration(SimulationConfiguration simconf)
Specified by:
notifySimulationConfiguration in interface Observer


Copyright © 2012. All Rights Reserved.