public final class ScriptRunnerUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ScriptRunnerUtil.ScriptOutput |
Modifier and Type | Field and Description |
---|---|
static Condition<Key> |
STDERR_OUTPUT_KEY_FILTER |
static Condition<Key> |
STDOUT_OR_STDERR_OUTPUT_KEY_FILTER |
static Condition<Key> |
STDOUT_OUTPUT_KEY_FILTER |
Modifier and Type | Method and Description |
---|---|
static OSProcessHandler |
execute(java.lang.String exePath,
java.lang.String workingDirectory,
VirtualFile scriptFile,
java.lang.String[] parameters) |
static OSProcessHandler |
execute(java.lang.String exePath,
java.lang.String workingDirectory,
VirtualFile scriptFile,
java.lang.String[] parameters,
java.nio.charset.Charset charset,
ThrowableNotNullFunction<? super GeneralCommandLine,? extends OSProcessHandler,? extends ExecutionException> creator) |
static ScriptRunnerUtil.ScriptOutput |
executeScriptInConsoleWithFullOutput(java.lang.String exePathString,
VirtualFile scriptFile,
java.lang.String workingDirectory,
long timeout,
Condition<? super Key> scriptOutputType,
java.lang.String... parameters) |
static java.lang.String |
getProcessOutput(GeneralCommandLine commandLine) |
static java.lang.String |
getProcessOutput(GeneralCommandLine commandLine,
Condition<? super Key> outputTypeFilter,
long timeout) |
static java.lang.String |
getProcessOutput(ProcessHandler processHandler,
Condition<? super Key> outputTypeFilter,
long timeout) |
static boolean |
isExecutableInPath(java.lang.String exeName) |
static void |
terminateProcessHandler(ProcessHandler processHandler,
long millisTimeout,
java.lang.String commandLine)
Gracefully terminates a process handler.
|
public static java.lang.String getProcessOutput(GeneralCommandLine commandLine) throws ExecutionException
ExecutionException
public static java.lang.String getProcessOutput(GeneralCommandLine commandLine, Condition<? super Key> outputTypeFilter, long timeout) throws ExecutionException
ExecutionException
public static java.lang.String getProcessOutput(ProcessHandler processHandler, Condition<? super Key> outputTypeFilter, long timeout) throws ExecutionException
ExecutionException
public static OSProcessHandler execute(java.lang.String exePath, java.lang.String workingDirectory, VirtualFile scriptFile, java.lang.String[] parameters) throws ExecutionException
ExecutionException
public static OSProcessHandler execute(java.lang.String exePath, java.lang.String workingDirectory, VirtualFile scriptFile, java.lang.String[] parameters, java.nio.charset.Charset charset, ThrowableNotNullFunction<? super GeneralCommandLine,? extends OSProcessHandler,? extends ExecutionException> creator) throws ExecutionException
ExecutionException
public static boolean isExecutableInPath(java.lang.String exeName)
public static ScriptRunnerUtil.ScriptOutput executeScriptInConsoleWithFullOutput(java.lang.String exePathString, VirtualFile scriptFile, java.lang.String workingDirectory, long timeout, Condition<? super Key> scriptOutputType, java.lang.String... parameters) throws ExecutionException
ExecutionException
public static void terminateProcessHandler(ProcessHandler processHandler, long millisTimeout, java.lang.String commandLine)
processHandler
- ProcessHandler
instancemillisTimeout
- timeout in milliseconds between 'soft kill' and 'force quite'commandLine
- command line