public class DefaultExecBinding extends Object implements ExecBinding
ExecBinding
.EXEC_COMMAND_ARGS, EXEC_COMMAND_EXECUTABLE, EXEC_COMMAND_OUT_FILE, EXEC_COMMAND_TIMEOUT, EXEC_COMMAND_WORKING_DIR, EXEC_EXIT_VALUE, EXEC_STDERR, EXEC_USE_STDERR_ON_EMPTY_STDOUT
Constructor and Description |
---|
DefaultExecBinding() |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
getAndRemoveHeader(org.apache.camel.Message message,
String headerName,
T defaultValue,
Class<T> headerType)
Gets and removes the
|
ExecCommand |
readInput(org.apache.camel.Exchange exchange,
ExecEndpoint endpoint)
|
void |
writeOutput(org.apache.camel.Exchange exchange,
ExecResult result)
Populates the exchange form the
ExecResult . |
protected void |
writeOutputInMessage(org.apache.camel.Message message,
ExecResult result)
Write the
ExecResult in the message body. |
public ExecCommand readInput(org.apache.camel.Exchange exchange, ExecEndpoint endpoint)
ExecBinding
readInput
in interface ExecBinding
exchange
- a Camel Exchange
endpoint
- an ExecEndpoint
instanceExecCommand
objectExecCommandExecutor
public void writeOutput(org.apache.camel.Exchange exchange, ExecResult result)
ExecBinding
ExecResult
.writeOutput
in interface ExecBinding
exchange
- a Camel Exchange
, in which to write the
result
result
- the result of a command executionExecCommandExecutor
protected void writeOutputInMessage(org.apache.camel.Message message, ExecResult result)
ExecResult
in the message body. Write the stderr and
the exit value for convenience in the message headers. message
- a Camel messageresult
- an ExecResult
instanceApache Camel