public class NativeExecutableCommand extends ExecutableCommand
ExecutableCommand
that provides the
ability to execute a native process. Caution should be taken with this
current implementation as no processing of EOL is provided and results may
vary on different platforms. It is recommended that only automated clients
use this feature due to the many differences in user terminals which may
cause problems with command output not performing as expected.session, stderr, stdin, stdout, STILL_ACTIVE
Constructor and Description |
---|
NativeExecutableCommand() |
Modifier and Type | Method and Description |
---|---|
boolean |
createProcess(String cmd,
Map<String,String> environment)
Create the process but wait for the
ExecutableCommand.onStart() method before
performing any IO. |
int |
getExitCode()
Get the exit code for this process.
|
void |
kill()
Kill the command.
|
void |
onStart()
Called once the command has been started.
|
void |
processStdinData(byte[] data)
Called by the session to pass incoming data into the process.
|
getInputStream, getOutputStream, getSession, getStderrOutputStream, getTimeout, init, start
public void onStart()
ExecutableCommand
onStart
in class ExecutableCommand
public int getExitCode()
ExecutableCommand
ExecutableCommand.STILL_ACTIVE
.getExitCode
in class ExecutableCommand
public boolean createProcess(String cmd, Map<String,String> environment)
ExecutableCommand
ExecutableCommand.onStart()
method before
performing any IO.createProcess
in class ExecutableCommand
public void processStdinData(byte[] data) throws IOException
ExecutableCommand
processStdinData
in class ExecutableCommand
IOException
public void kill()
ExecutableCommand
kill
in class ExecutableCommand
Copyright © 2024. All rights reserved.