Interface CommandExecutor
-
- All Known Implementing Classes:
DefaultCommandExecutor
public interface CommandExecutor
Command Executor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandResult
execute(Command command)
Execute command and build the result.CommandResult
execute(Command command, OutputHandler handler)
Execute command and build the result.CommandProcess
start(Command command)
Start command line and return associated process.
-
-
-
Method Detail
-
execute
CommandResult execute(Command command) throws IOException
Execute command and build the result. **NOTE:** Execution is synchronous.- Parameters:
command
- Command input.- Returns:
- Result of execution.
- Throws:
IOException
- If an error occurred during execution.
-
execute
CommandResult execute(Command command, OutputHandler handler) throws IOException
Execute command and build the result. **NOTE:** Execution is synchronous.- Parameters:
command
- Command.handler
- Custom output handler.- Returns:
- Result of execution.
- Throws:
IOException
- If an error occurred during operation.
-
start
CommandProcess start(Command command) throws IOException
Start command line and return associated process. This process will be used to: - Read output. - Write arguments.- Parameters:
command
- Command.- Returns:
- Process.
- Throws:
IOException
- If an error occurred during operation.
-
-