Class Kernel.Launcher
java.lang.Object
|
+--java.lang.Thread
|
+--Kernel.Launcher
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- Kernel
- private static class Kernel.Launcher
- extends Thread
Method Summary |
void |
delete()
Removes this Launcher from the set of all active Launchers. |
static void |
joinAll()
Waits for all existing Launchers to complete. |
static int |
joinOne(int pid)
Waits for a particular Launcher to complete. |
void |
run()
Main loop of the Launcher |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
pidMap
static Hashtable pidMap
nextpid
private static int nextpid
method
private Method method
arglist
private Object[] arglist
pid
private Integer pid
returnCode
private int returnCode
Kernel.Launcher
public Kernel.Launcher(String command,
String[] args)
throws Exception
- Creates a new Launcher for a program.
- Parameters:
command
- the name of the program (new name of a class with
a main(String[]) method.args
- command-line arguments to the program.
run
public void run()
- Main loop of the Launcher
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
joinAll
public static void joinAll()
- Waits for all existing Launchers to complete.
joinOne
public static int joinOne(int pid)
- Waits for a particular Launcher to complete.
- Parameters:
pid
- the process id of the desired process.
delete
public void delete()
- Removes this Launcher from the set of all active Launchers.