public interface CommandExec
| Modifier and Type | Method and Description |
|---|---|
Future<ProcessTask> |
exec(CommandLine commandLine,
PropertyChangeListener... listeners)
Executes the command specified by the command line.
|
void |
setCommandError(CommandOutput error)
Sets that reads the error output of the command.
|
void |
setCommandInput(CommandInput input)
Sets that writes to the standard input of the command.
|
void |
setCommandOutput(CommandOutput output)
Sets that reads the standard output of the command.
|
void |
setDestroyOnTimeout(boolean flag)
Sets to destroy the executed command on timeout.
|
void |
setExitCode(int... code)
Sets the valid command code(s).
|
void |
setObserver(Observer... observer)
Sets the additional observer(s) for the command task.
|
void |
setThreads(Threads threads)
Sets the threads pool.
|
void setThreads(Threads threads)
threads - the Threads.void setCommandOutput(CommandOutput output)
output - the CommandOutput.void setCommandError(CommandOutput error)
output - the CommandOutput.void setCommandInput(CommandInput input)
input - the CommandInput.void setExitCode(int... code)
code - the valid command code(s).void setDestroyOnTimeout(boolean flag)
flag - sets to true to destroy the executed command on
timeout.void setObserver(Observer... observer)
observer - the Observer observer(s).Future<ProcessTask> exec(CommandLine commandLine, PropertyChangeListener... listeners) throws CommandExecException
commandLine - the DefaultCommandLine.listeners - the PropertyChangeListener listeners that are informed
when the command finishes.Future of ProcessTask.CommandExecException - if there was an error executing the command; if the command
was not found; if the exit code of the command is not valid.Copyright © 2014–2016. All rights reserved.