|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Process lifecycle interface.
Used to provide each Logical Process with a independent thread of control.
Executive implementations contains one instance of a class implementing Flow. Interface Flow exists so
that Executives can switch transparently between processes based on Java threads and lightweight thread.
Simulation developers do not see or use this interface.
Copyright (c) 2003 The MITRE Corporation
Method Summary | |
void |
delayExecutive(long period)
Suspend the executive execution for the supplied number of millisesconds. |
void |
elaborate(LogicalProcess lp)
Create a new process for the supplied LogicalProcess. |
void |
elaborated(LogicalProcess lp)
Informs the Flow implementation that a new process is created and then suspends that new process. |
void |
pauseExecutive()
Suspend the executive execution until a call to resumeExecutive is made. |
void |
registerExecutive(Executive e)
Create the linkage between the Flow implementation and the Executive inplementation it supports. |
void |
resumeExecutive()
Resume the executive execution that was suspended by a call to pauseExecutive . |
void |
setLogger(java.util.logging.Logger l)
Provides a logger that the executive uses to log diagnostic and other error messages. |
void |
setProperties(java.util.Properties p)
Provide the current propertes to the Flow implementation. |
void |
terminateLP(LogicalProcess lp)
Called by the Executive process. |
void |
terminateSelf(LogicalProcess lp)
Called by the LogicalProcess process. |
java.lang.String |
version()
Returns the version of the class implementing interface Flow. |
void |
yieldToExecutive(LogicalProcess lp)
Pass control from the specified LogicalProcess to the Executive. |
void |
yieldToLP(LogicalProcess lp)
Pass control from the Executive to the specified LogicalProcess. |
Method Detail |
public java.lang.String version()
public void registerExecutive(Executive e)
Call by the executive process.
Precondition: Executive has control
Postcondition: Executive has control
e
- public void elaborate(LogicalProcess lp)
Call by the executive process.
Precondition: Executive has control and lp process does not exist
Postcondition: Executive has control and lp process exist and lp process is suspended
lp
- public void elaborated(LogicalProcess lp)
Called by the LogicalProcess process.
Precondition: lp has control
Postcondition: Executive has control
lp
- LogicalProcess that has finished its elaboration process and is
ready to be suspended.public void yieldToLP(LogicalProcess lp)
Called by the Executive process.
Precondition: Executive has control
Postcondition: lp has control
lp
- The LogicalProcess choosen for activation bt the Executive.public void yieldToExecutive(LogicalProcess lp)
Called by the LogicalProcess process.
Precondition: lp has control
Postcondition: Executive has control
lp
- LogicalProcess wishing to yield control to the Executive.public void terminateSelf(LogicalProcess lp)
Precondition: lp has control
Postcondition: lp process does not exist and Executive has control
lp
- LogicalProcess to the destroyed.public void terminateLP(LogicalProcess lp)
Precondition: Executive has control
Postcondition: lp process does not exist and Executive has control
lp
- LogicalProcess to the destroyed.public void delayExecutive(long period)
Called by the Executive process.
period
- Number of milliseconds to pause the Executive.public void pauseExecutive()
resumeExecutive
is made.
This method has no effect if the Executive is already paused.
Called by a process outside of the Executive.
public void resumeExecutive()
pauseExecutive
.
This method has no effect if the Executive is already running.
Called by a process outside of the Executive.
public void setProperties(java.util.Properties p)
p
- The set of properties.public void setLogger(java.util.logging.Logger l)
l
- The logger for the executive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |