public abstract class VT100EmulatorChildProcess extends AbstractChildProcess
Modifier and Type | Class and Description |
---|---|
private class |
VT100EmulatorChildProcess.Cleaner
Provides a simple mechanism to wait for the exit of a process on an asynchronous basis
(on a new thread dedicated to this wait).
|
Modifier and Type | Field and Description |
---|---|
protected VT100Emulator |
emulator
Child process wrapped by a VT100 terminal emulator.
|
protected java.lang.Thread |
worker
Emulator worker thread.
|
artificial, batch, terminal
Constructor and Description |
---|
VT100EmulatorChildProcess()
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
asynchCleanup(int pid)
Asynchronously cleanup any operating system resources when the interactive child process
has exited.
|
abstract VT100Emulator |
createShellEmulator(java.lang.String[] cmdline)
Create a shell emulator and execute the given command.
|
int |
launch(java.lang.String[] cmdline,
boolean silent)
Launch the specified command line as an interactive child process.
|
int |
pauseForUser()
Wait for the user to press a key.
|
void |
waitForExit(int pid,
boolean silent)
Block execution until the interactive child process has exited.
|
inBatchMode, isArtificialTerm, resume, suspend
protected VT100Emulator emulator
protected java.lang.Thread worker
public VT100EmulatorChildProcess()
public abstract VT100Emulator createShellEmulator(java.lang.String[] cmdline)
cmdline
- The command.public int launch(java.lang.String[] cmdline, boolean silent)
cmdline
- The command line to execute. The first element must be the program name.silent
- false
for interactive mode (there the terminal is expected to be
shared by the child process and the user is allowed to directly interact with
the child process.public void waitForExit(int pid, boolean silent) throws java.lang.InterruptedException
pid
- The operating system process ID of the child process on which to wait.silent
- false
for interactive mode (there the terminal is expected to be
shared by the child process and the user is allowed to directly interact with
the child process.java.lang.InterruptedException
public void asynchCleanup(int pid)
pid
- The operating system process ID of the child process on which to wait.public int pauseForUser()
pauseForUser
in interface InteractiveChildProcess
pauseForUser
in class AbstractChildProcess