public interface Launcher
This API is design to provide a clean mechanism for remote process launching (launching that occurs on a remote network node).
Modifier and Type | Method and Description |
---|---|
int |
launch(java.lang.String[] cmdlist,
boolean silent,
boolean wait,
boolean console)
Launches the external executible specified by the
cmdlist
taking into account the flags which specify synchronous or asynchronous
operation and whether a prompt is provided after the child process
terminates. |
void |
launch(java.lang.String[] cmdlist,
int sout,
int sin)
Launches the external executible specified by the
cmdlist
on an asynchronous basis. |
int launch(java.lang.String[] cmdlist, boolean silent, boolean wait, boolean console)
cmdlist
taking into account the flags which specify synchronous or asynchronous
operation and whether a prompt is provided after the child process
terminates. The command is always executed as a child process of the
shell which is a child process of the JVM process on the node in which
this is served.
STDIN
, STDOUT
and STDERR
are
all linked from the child process to the current JVM process using
a StreamConnector
for each pipe.
cmdlist
- The command line to be executed, with the first element
used as the program to run and all other array elements as
the arguments.silent
- If true
the default prompt is suppressed.
Otherwise, ThinClient.pause
is called when the
child process exits.wait
- If true
, synchronous operation is requested
which waits for the termination of the child process on the
current thread. If false
, a thread will be
started to wait for the child process termination and to
subsequently handle cleanup (asynchronous mode).console
- If true
, the process is starting in a separate new console,
false
means using 4GL no-console option.void launch(java.lang.String[] cmdlist, int sout, int sin)
cmdlist
on an asynchronous basis. The command is always executed as a child
process of the shell which is a child process of the the JVM process on
the node in which this is served.
STDIN
, STDOUT
and STDERR
are
all linked from the child process to the passed parameters if
those parameters are not null
. Any null
pipes are closed immediately and those pipes connected with the
passed parameters must be closed by the caller. Please see the
ProcessStream
for more details.
cmdlist
- The command line to be executed, with the first element
used as the program to run and all other array elements as
the arguments.sout
- The id of a ProcessStream
instance to be connected to
the child process' STDOUT and STDERR
or
-1 for no connection. Used for reading.sin
- The id of a ProcessStream
instance to be
connected to the child process' STDIN
or
-1 for no connection. Used for writing.