public interface ProcessExecutor
| Modifier and Type | Method and Description |
|---|---|
int |
execute(ProcessContext ctx)
Synchronously executes the given
ProcessContext. |
int |
execute(java.lang.String[] command,
java.lang.String[] environment,
java.io.File directory,
Drain stdOutput,
Drain stdError)
Synchronously executes the given command in the given environment and directory.
|
void |
quit()
Terminates this
ProcessExecutor and frees all associated resources. |
int execute(java.lang.String[] command,
java.lang.String[] environment,
java.io.File directory,
Drain stdOutput,
Drain stdError)
throws java.io.IOException
command - the command line to execute/environment - the environment to usedirectory - the directory to execute the command instdOutput - callback handle to process the processes standard outputstdError - callback handle to process the processes standard error outputjava.io.IOException - on any error executing the process.Runtime.exec(String[], String[], File)int execute(ProcessContext ctx) throws java.io.IOException
ProcessContext.ctx - the context to executejava.io.IOException - on eny error while executing the process.void quit() throws java.io.IOException
ProcessExecutor and frees all associated resources.
Note the lifecycle of a ProcessExecutor has tenant scope, i.e. there is no need to call quit()
except when shutting down the server (what will be done automatically).java.io.IOException - on any errorCopyright © 2018 SAP SE. All Rights Reserved.