org.apache.camel.component.exec.impl
Class DefaultExecCommandExecutor

java.lang.Object
  extended by 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
DefaultExecCommandExecutor()
           
 
Method Summary
 ExecResult execute(ExecCommand command)
          Executes the command and returns a not-null ExecResult instance.
protected  org.apache.commons.exec.DefaultExecutor prepareDefaultExecutor(ExecCommand execCommand)
           
protected  org.apache.commons.exec.CommandLine toCommandLine(ExecCommand execCommand)
          Transforms an ExecCommand to a CommandLine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExecCommandExecutor

public DefaultExecCommandExecutor()
Method Detail

execute

public ExecResult execute(ExecCommand command)
Description copied from interface: ExecCommandExecutor
Executes the command and returns a not-null ExecResult instance.

Specified by:
execute in interface ExecCommandExecutor
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 an ExecCommand to a CommandLine. No quoting fo the arguments is used.

Parameters:
execCommand - a not-null ExecCommand instance.
Returns:
a CommandLine object.


Apache CAMEL