NOS.system
Class NOSProcess

java.lang.Object
  extended by NOS.system.NOSProcess

public class NOSProcess
extends java.lang.Object


Constructor Summary
NOSProcess(java.lang.String jar, java.lang.String app, java.lang.String[] args)
          Creates a new NOSProcess object.
 
Method Summary
 void deRegisterWindow(NOSWindow window)
          DeRegisters a window with this process.
 java.lang.String getApp()
          Returns the name of the main class for this application
 java.lang.String[] getArgs()
          Returns the arguments used to create this application
 NOSDesktop getDesktop()
          returns the NOSDesktop that is associated with this process.
 java.lang.String getDir()
          Returns the directory in which this application was run.
 java.lang.Integer getID()
          Returns the process ID
 NOSSystem getSystem()
          returns the NOSSystem instance that was active when this process was created.
 boolean isRunning()
          Returns true if this process is currently running.
 void registerWindow(NOSWindow window)
          Registers a window with this process.
 void start()
          Starts running this process.
 void stop()
          Stops running this process.
 void stopAndWait()
          Stops running this process and waits for it to finish.
 java.lang.String toString()
          Returns a String representation of this process object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NOSProcess

public NOSProcess(java.lang.String jar,
                  java.lang.String app,
                  java.lang.String[] args)
Creates a new NOSProcess object.

Parameters:
jar - The path to the JAR file that contains the main class for this application
app - The name of the main class for this application.
args - The arguments for the application
Method Detail

getID

public java.lang.Integer getID()
Returns the process ID

Returns:
The process ID

isRunning

public boolean isRunning()
Returns true if this process is currently running.

Returns:
True if this process is currently running.

getArgs

public java.lang.String[] getArgs()
Returns the arguments used to create this application

Returns:
the arguments used to create this application

getDir

public java.lang.String getDir()
Returns the directory in which this application was run.

Returns:
The directory in which this application was run.

getApp

public java.lang.String getApp()
Returns the name of the main class for this application

Returns:
the name of the main class for this application

getSystem

public NOSSystem getSystem()
returns the NOSSystem instance that was active when this process was created.

Returns:
the NOSSystem instance that was active when this process was created.

getDesktop

public NOSDesktop getDesktop()
returns the NOSDesktop that is associated with this process.

Returns:
the NOSDesktop that is associated with this process.

registerWindow

public void registerWindow(NOSWindow window)
Registers a window with this process.

Parameters:
window - The window

deRegisterWindow

public void deRegisterWindow(NOSWindow window)
DeRegisters a window with this process.

Parameters:
window - The window

start

public void start()
Starts running this process.


stop

public void stop()
Stops running this process.


stopAndWait

public void stopAndWait()
Stops running this process and waits for it to finish.


toString

public java.lang.String toString()
Returns a String representation of this process object.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this process object.