|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--os.OSProcess
OSProcess is a abstract base class used to write processes that run under the Bot Operating System. The process contains information about the id of the process, the parent id of the process, whether or not the process is waiting for another process to complete, whether it is initialized and what its arguments list is. In addition it has access to the shared interprocess communication space so that it can communicate with other processes that are running.
| Constructor Summary | |
OSProcess()
Create a process that can run in the Bot Operating System. |
|
| Method Summary | |
void |
done()
This is called by the operating system during the clean up phase of the process. |
java.lang.String[] |
getArgs()
Gets the arguments that were passed to this process. |
int |
getExitStatus()
Gets the exit status for this process. |
int |
getId()
Gets the id of this process. |
java.lang.Object |
getObject()
Gets an object for use by this process. |
int |
getParentId()
Gets the parentId of this process. |
Shared |
getShared()
Gets the shared interprocess communication area for this process. |
int |
getWaitingFor()
Gets the process id of the process this process is waiting for. |
void |
initialize()
This is called by the operating system during the initialization phase of the process. |
boolean |
isInitialized()
Determines if the process has been initialized. |
boolean |
isWaitingFor()
Determines if this process is waiting for another process to complete. |
void |
registerObject(java.lang.String name,
java.lang.Object o)
Register an object in the shared interprocess communication space. |
java.lang.Object |
requestObject(java.lang.String name)
Request an object from the shared interprocess communication space. |
abstract void |
run()
The method that is called to do the real work of the process. |
void |
setArgs(java.lang.String args)
Sets the arguments from the string that is specified. |
void |
setArgs(java.lang.String[] args)
Sets the arguments array to the specified String array. |
void |
setExitStatus(int exitStatus)
Sets the exit status for this process. |
void |
setId(int id)
Sets the id of this process. |
void |
setInitialized(boolean initialized)
Sets the processes initialized flag. |
void |
setObject(java.lang.Object o)
Sets an object for use by this process. |
void |
setParentId(int parentId)
Sets the parent id of this process. |
void |
setShared(Shared shared)
Sets the shared interprocess communication area for this process. |
void |
setWaitingFor(int waitingFor)
Sets the process id of the process this process is waiting for. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public OSProcess()
| Method Detail |
public void setId(int id)
id - the id to set this process to.public int getId()
public void setParentId(int parentId)
parentId - the parentId to set this process to.public int getParentId()
public void setWaitingFor(int waitingFor)
waitingFor - the id of the process that this process is
waiting to complete.public int getWaitingFor()
public boolean isWaitingFor()
public void setExitStatus(int exitStatus)
exitStatus - the exit status of this process.public int getExitStatus()
public void initialize()
public void setShared(Shared shared)
shared - the shared interprocess communication area.public Shared getShared()
public void registerObject(java.lang.String name,
java.lang.Object o)
name - the name of the object for reference in the shared
interprocess communication space.o - the object to add to the shared interprocess communication
space.public java.lang.Object requestObject(java.lang.String name)
name - the name that the object was registered with.
public abstract void run()
throws OSProcessRelinquishControl,
OSProcessDone,
OSProcessLoadProcess,
OSProcessExecProcess,
OSProcessWaitForProcess
public void done()
public boolean isInitialized()
public void setInitialized(boolean initialized)
initialized - the flag that specifies whether the process has
been initialized.public void setObject(java.lang.Object o)
o - the object to be set.public java.lang.Object getObject()
public void setArgs(java.lang.String[] args)
args - the arguments to the program.public void setArgs(java.lang.String args)
args - the args to parse.public java.lang.String[] getArgs()
public java.lang.String toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||