|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--scorej.Scenario
Abstract base class for all ScoreJ scenarios.
| Field Summary | |
protected double |
_realTimeFactor
|
protected boolean |
_realTimeP
|
protected boolean |
_reportP
|
protected java.lang.String |
_scenarioName
|
| Constructor Summary | |
Scenario()
Default constructor creates an instance of Scenario class. |
|
Scenario(java.lang.String name)
Constructor taking name of the scenario as argument. |
|
| Method Summary | |
java.lang.String |
getName()
Getter for scenario name. |
void |
initializeScenario()
Initializes the scenario. |
void |
initializeScenario(OmarClock clock,
boolean isClockDaemonThread)
Initializes the scenario at the node. |
void |
pauseScenario()
Call this method to pause a currently running scenario. |
void |
resumeScenario()
Call this method to resume a paused scenario. |
void |
scenarioInit()
This handler is invoked as the last step of scenario initialization. |
void |
scenarioPause()
This handler is invoked after scenario is paused. |
abstract void |
scenarioProcedure()
This method gets called when startScenario is called. |
void |
scenarioResume()
This handler is invoked after scenario is resumed after a pause. |
void |
scenarioStop()
This handler is invoked after scenario is stopped. |
void |
setName(java.lang.String name)
Setter for scenario name. |
void |
setRealTime(boolean rt,
double rtF)
Call this method to specify whether the node clock and, hence, this scenario should be run in the real time mode and the real time factor to speed up or slow down the clock and hence the scenario. |
void |
setReportP(boolean rp)
|
void |
startLogger()
Starts logging at the node. |
java.lang.Thread |
startScenario()
Starts the scenario. |
void |
stopScenario()
Call this method to stop a currently running or paused scenario. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean _realTimeP
protected double _realTimeFactor
protected boolean _reportP
protected java.lang.String _scenarioName
| Constructor Detail |
public Scenario(java.lang.String name)
public Scenario()
| Method Detail |
public void setName(java.lang.String name)
public java.lang.String getName()
public void setRealTime(boolean rt,
double rtF)
rt - true if the clock is to be run in real time node, false
otherwise.public void setReportP(boolean rp)
public void startLogger()
public void initializeScenario()
public void initializeScenario(OmarClock clock,
boolean isClockDaemonThread)
scenarioInit() handler as the last step of
scenario initialization.
clock - the clock object to use. Specifying a value of null causes
the default clock at the node to be used.isClockDaemonThread - whether the clock thread should be run as
a daemon thread, so that it will stop when all non-daemon threads come
to an end.public java.lang.Thread startScenario()
scenarioProcedure().
public void resumeScenario()
public void pauseScenario()
scenarioPause() handler
after the scenario is paused.
public void stopScenario()
scenarioStop() handler
after the scenario is stopped.
public void scenarioInit()
public void scenarioPause()
public void scenarioResume()
public void scenarioStop()
public abstract void scenarioProcedure()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||