Class DefaultExecCommandExecutor
java.lang.Object
org.apache.camel.component.exec.impl.DefaultExecCommandExecutor
- All Implemented Interfaces:
ExecCommandExecutor
Executes the command utilizing the Apache Commons exec library. Adds a
shutdown hook for every executed process.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(ExecCommand command) protected org.apache.commons.exec.DefaultExecutor
prepareDefaultExecutor
(ExecCommand execCommand) protected org.apache.commons.exec.CommandLine
toCommandLine
(ExecCommand execCommand) Transforms anExecCommand
to aCommandLine
.
-
Constructor Details
-
DefaultExecCommandExecutor
public DefaultExecCommandExecutor()
-
-
Method Details
-
execute
Description copied from interface:ExecCommandExecutor
- Specified by:
execute
in interfaceExecCommandExecutor
- Parameters:
command
- The command object, that describes the executable application- Returns:
- the result
-
prepareDefaultExecutor
-
toCommandLine
Transforms anExecCommand
to aCommandLine
. No quoting fo the arguments is used.- Parameters:
execCommand
- a not-nullExecCommand
instance.- Returns:
- a
CommandLine
object.
-