Exec

Exec

Scheme: exec

The endpoint utilizes an {@link ExecCommandExecutor} to execute a system command when it receives message exchanges. @see ExecBinding @see ExecCommandExecutor @see ExecCommand @see ExecResult

Name Kind Type Required Deprecated Default Value Enum Values Description
executable path java.lang.String true false Sets the executable to be executed. The executable must not be empty or null.
args parameter java.lang.String false The arguments may be one or many whitespace-separated tokens.
workingDir parameter java.lang.String false The directory in which the command should be executed. If null, the working directory of the current process will be used.
timeout parameter long false The timeout, in milliseconds, after which the executable should be terminated. If execution has not completed within the timeout, the component will send a termination request.
outFile parameter java.lang.String false The name of a file, created by the executable, that should be considered as its output. If no outFile is set, the standard output (stdout) of the executable will be used instead.
commandExecutor parameter org.apache.camel.component.exec.ExecCommandExecutor false A reference to a org.apache.commons.exec.ExecCommandExecutor in the Registry that customizes the command execution. The default command executor utilizes the commons-exec library, which adds a shutdown hook for every executed command.
binding parameter org.apache.camel.component.exec.ExecBinding false A reference to a org.apache.commons.exec.ExecBinding in the Registry.
useStderrOnEmptyStdout parameter boolean false A boolean indicating that when stdout is empty, this component will populate the Camel Message Body with stderr. This behavior is disabled (false) by default.
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter boolean false false Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).