public class ProcessLauncher
extends java.lang.Thread
Constructor and Description |
---|
ProcessLauncher(java.lang.String command)
Creates a new instance of ProcessLauncher
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ProcessLauncherListener listener)
Adds the listener to the event queue
|
java.lang.String |
getActualCommand()
Getter for actualCommand
|
java.lang.Process |
getProcess()
Getter for process
|
void |
removeListener(ProcessLauncherListener listener)
Removes the given object from the event queue
|
void |
run() |
protected void |
setActualCommand(java.lang.String actualCommand)
Setter for actualCommand
|
protected void |
setProcess(java.lang.Process process)
Setter for process
|
void |
stopProcess()
Stops the process.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public ProcessLauncher(java.lang.String command)
command
- String command, and all its arguments, to launchpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void addListener(ProcessLauncherListener listener)
listener
- Object that wishes to receive update eventspublic void removeListener(ProcessLauncherListener listener)
listener
- Object that no longer wants to receive update eventspublic void stopProcess()
public java.lang.Process getProcess()
protected void setProcess(java.lang.Process process)
process
- Internal process that is spawned from the commandpublic java.lang.String getActualCommand()
protected void setActualCommand(java.lang.String actualCommand)
actualCommand
- Actual command line passed to the Runtime.exec() command