|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mitre.sim.api3.exec.reference.ReferenceExecutive
Reference implementation of the Executive
interface.
Copyright © 2003-2004 The MITRE Corporation
Constructor Summary | |
ReferenceExecutive()
|
Method Summary | |
void |
actionMethodInvoked(LogicalProcess lp)
Inform the executive that LogicalProcess lp
has received an action method invocation. |
Population |
createPopulation(java.lang.Class c,
LogicalProcess lp)
Create a population of class c entities for entity lp. |
java.util.Set |
getLogicalProcessesByState(State s)
Used to test Executive implementations and is not needed
by simulation developers. |
long |
getPace()
Get the minimum amount of real time that must pass before the simulation advances one unit of simulation time. |
double |
getTimeLast()
Called by LogicalProcess |
double |
getTimeNow()
Called by LogicalProcess |
void |
registerLogicalProcess(LogicalProcess lp)
Add the supplied lp to the collection of logical processes managed by an implementation of Executive. |
void |
runLogicalProcess(LogicalProcess lp)
Begin the execution of the LogicalProcess. |
void |
schedule(java.lang.reflect.Method eventMethod,
double eventDelay,
LogicalProcess lp,
java.lang.Object[] arguments)
Schedule a method for execution. |
void |
setFlow(Flow f)
|
void |
setLogger(java.util.logging.Logger l)
Provides a logger that the executive uses to log diagnostic and other error messages. |
void |
setPace(long period)
Set the minimum amount of real time that must pass before the simulation advances one unit of simulation time. |
void |
setProperties(java.util.Properties p)
|
void |
setTimeLast(double last)
Set the final value of simulation time that the Executive implementation will recognize. |
void |
startSimulation()
Begin the evolution of simulation time. |
void |
stopSimulation(LogicalProcess lp)
Stop the evolution of simulation time and end the simulation. |
java.lang.String |
version()
Returns the version of the class implementing interface Executive. |
WaitResult |
waitForEvent(Trigger[] conditions,
double backStop,
LogicalProcess lp)
Wait for a Trigger to be true or an action method invocation. |
WaitResult |
waitForTime(double t,
LogicalProcess lp)
Wait for simulation time to pass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReferenceExecutive()
Method Detail |
public java.lang.String version()
Executive
version
in interface Executive
public void setFlow(Flow f)
setFlow
in interface Executive
public final void startSimulation()
Executive
Called by Simulation
startSimulation
in interface Executive
public final void stopSimulation(LogicalProcess lp)
Executive
Called by LogicalProcess
stopSimulation
in interface Executive
public final void registerLogicalProcess(LogicalProcess lp)
Executive
Called by Simulation and LogicalProcess
registerLogicalProcess
in interface Executive
lp
- public final void actionMethodInvoked(LogicalProcess lp) throws java.lang.IllegalStateException
Executive
LogicalProcess
lp
has received an action method invocation.
Called by LogicalProcess
actionMethodInvoked
in interface Executive
lp
-
java.lang.IllegalStateException
public WaitResult waitForTime(double t, LogicalProcess lp)
Executive
Called by LogicalProcess
waitForTime
in interface Executive
t
- lp
-
WaitResult
public WaitResult waitForEvent(Trigger[] conditions, double backStop, LogicalProcess lp)
Executive
Called by LogicalProcess
waitForEvent
in interface Executive
conditions
- backStop
- lp
-
WaitResult
public final void runLogicalProcess(LogicalProcess lp)
Executive
Called by LogicalProcess
runLogicalProcess
in interface Executive
lp
- runLogicalProcess(LogicalProcess)
public void setPace(long period)
Executive
setPace
in interface Executive
period
- Minimum number of real milliseconds that must pass before one
unit of simulation time passes.public long getPace()
Executive
getPace
in interface Executive
public final double getTimeNow()
Executive
Called by LogicalProcess
getTimeNow
in interface Executive
public final void setTimeLast(double last)
Executive
Called by LogicalProcess
setTimeLast
in interface Executive
last
- public final double getTimeLast()
Executive
Called by LogicalProcess
getTimeLast
in interface Executive
public void setProperties(java.util.Properties p)
setProperties
in interface Executive
public Population createPopulation(java.lang.Class c, LogicalProcess lp)
Executive
createPopulation
in interface Executive
c
- All entities in the population must be of this class.lp
- Entity that created the population.
public void schedule(java.lang.reflect.Method eventMethod, double eventDelay, LogicalProcess lp, java.lang.Object[] arguments)
Executive
schedule
in interface Executive
eventMethod
- Method to be invoked.eventDelay
- Amount of simulation time that must pass before eventMethod
is invoked.lp
- Entity instance that contains method eventMethod
.public java.util.Set getLogicalProcessesByState(State s)
Executive
Executive
implementations and is not needed
by simulation developers.
getLogicalProcessesByState
in interface Executive
public void setLogger(java.util.logging.Logger l)
Executive
setLogger
in interface Executive
l
- The logger for the executive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |