Class DefaultExecCommandExecutor
- java.lang.Object
-
- org.apache.camel.component.exec.impl.DefaultExecCommandExecutor
-
- All Implemented Interfaces:
ExecCommandExecutor
public class DefaultExecCommandExecutor extends Object implements ExecCommandExecutor
Executes the command utilizing the Apache Commons exec library. Adds a shutdown hook for every executed process.
-
-
Constructor Summary
Constructors Constructor Description DefaultExecCommandExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecResultexecute(ExecCommand command)protected org.apache.commons.exec.DefaultExecutorprepareDefaultExecutor(ExecCommand execCommand)protected org.apache.commons.exec.CommandLinetoCommandLine(ExecCommand execCommand)Transforms anExecCommandto aCommandLine.
-
-
-
Method Detail
-
execute
public ExecResult execute(ExecCommand command)
Description copied from interface:ExecCommandExecutor- Specified by:
executein interfaceExecCommandExecutor- Parameters:
command- The command object, that describes the executable application- Returns:
- the result
-
prepareDefaultExecutor
protected org.apache.commons.exec.DefaultExecutor prepareDefaultExecutor(ExecCommand execCommand)
-
toCommandLine
protected org.apache.commons.exec.CommandLine toCommandLine(ExecCommand execCommand)
Transforms anExecCommandto aCommandLine. No quoting fo the arguments is used.- Parameters:
execCommand- a not-nullExecCommandinstance.- Returns:
- a
CommandLineobject.
-
-