public class CommandRunner extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CommandRunner.CommandOutput
Class that represents the output of a command.
|
static class |
CommandRunner.ProcessInterface
Interface provided to access the process while it is running.
|
| Constructor and Description |
|---|
CommandRunner()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
CommandRunner.ProcessInterface |
run_command_async(String[] cmds,
File directory,
int limit)
Runs a command and captures the output.
|
CommandRunner.CommandOutput |
run_command(String[] cmds,
File directory,
int limit)
This method is a shortcut for the
run_command_async(String[], File, int). |
CommandRunner.CommandOutput |
runCommand(String[] cmds,
File directory,
int limit)
Deprecated.
|
CommandRunner.ProcessInterface |
runCommandAsync(String[] cmds,
File directory,
int limit)
Deprecated.
|
public CommandRunner.ProcessInterface run_command_async(String[] cmds, File directory, int limit) throws IOException
CommandRunner.ProcessInterface class.cmds - the command and its argumentsdirectory - the directory where the command should bd executedlimit - execution time limit (in seconds)IOException - failed to launch the process@Deprecated public CommandRunner.ProcessInterface runCommandAsync(String[] cmds, File directory, int limit) throws IOException
run_command_async(String[], File, int)cmds - deprecateddirectory - deprecatedlimit - deprecatedIOException - deprecatedpublic CommandRunner.CommandOutput run_command(String[] cmds, File directory, int limit) throws IOException
run_command_async(String[], File, int). It will invoke the
command, wait for it to run and returns the command's output.cmds - the command and its argumentsdirectory - the directory where the command should bd executedlimit - execution time limit (in seconds)IOException - failed to launch the process@Deprecated public CommandRunner.CommandOutput runCommand(String[] cmds, File directory, int limit) throws IOException
run_command(String[], File, int)cmds - deprecateddirectory - deprecatedlimit - deprecatedIOException - deprecatedCopyright © 2015. All rights reserved.