be.ac.ulg.montefiore.run.totem.scenario.facade
Class ScenarioManager

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.scenario.facade.ScenarioManager

public class ScenarioManager
extends java.lang.Object

ScenarioManager is a singleton that provides a global point of access to the scenario information.

Creation date: 1-Jan-2004

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be), Gael Monfort (monfort@run.montefiore.ulg.ac.be)

Method Summary
 void executeNextEvent()
          Executes the next event in the scenario if there is one.
 void executeNextEvents(int n)
          Executes the n next events in the scenario.
 void executeScenario()
          Executes the rest of the scenario.
static ScenarioManager getInstance()
          Returns the single instance of the ScenarioManager.
 boolean hasNext()
          Returns true if there are pending events and false otherwise.
 boolean isStopOnError()
           
 void loadScenario(Scenario scenario)
          Loads the specified scenario object into the manager.
 void loadScenario(java.lang.String fileName)
          Loads the specified scenario XML file.
 void setStopOnError(boolean stopOnError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isStopOnError

public boolean isStopOnError()

setStopOnError

public void setStopOnError(boolean stopOnError)

getInstance

public static ScenarioManager getInstance()
Returns the single instance of the ScenarioManager.


loadScenario

public void loadScenario(Scenario scenario)
Loads the specified scenario object into the manager.


loadScenario

public void loadScenario(java.lang.String fileName)
Loads the specified scenario XML file.


executeScenario

public void executeScenario()
Executes the rest of the scenario.


executeNextEvent

public void executeNextEvent()
Executes the next event in the scenario if there is one.


executeNextEvents

public void executeNextEvents(int n)
Executes the n next events in the scenario. If there are less than n pending events, this method is equivalent to executeScenario.

Parameters:
n - The number of events to execute.

hasNext

public boolean hasNext()
Returns true if there are pending events and false otherwise.



Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.