@UriEndpoint(firstVersion="2.3.0",
scheme="exec",
title="Exec",
syntax="exec:executable",
producerOnly=true,
label="system")
public class ExecEndpoint
extends org.apache.camel.support.DefaultEndpoint
Modifier and Type | Field and Description |
---|---|
static long |
NO_TIMEOUT
Indicates that no
timeout is used. |
Constructor and Description |
---|
ExecEndpoint(String uri,
ExecComponent component) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
String |
getArgs() |
ExecBinding |
getBinding() |
ExecCommandExecutor |
getCommandExecutor() |
String |
getExecutable() |
String |
getOutFile() |
long |
getTimeout() |
String |
getWorkingDir() |
boolean |
isSingleton() |
boolean |
isUseStderrOnEmptyStdout() |
void |
setArgs(String args)
The arguments may be one or many whitespace-separated tokens.
|
void |
setBinding(ExecBinding binding)
A reference to a org.apache.commons.exec.ExecBinding in the Registry.
|
void |
setCommandExecutor(ExecCommandExecutor commandExecutor)
A reference to a org.apache.commons.exec.ExecCommandExecutor in the Registry that customizes the command execution.
|
void |
setExecutable(String executable)
Sets the executable to be executed.
|
void |
setOutFile(String outFile)
The name of a file, created by the executable, that should be considered as its output.
|
void |
setTimeout(long timeout)
The timeout, in milliseconds, after which the executable should be terminated.
|
void |
setUseStderrOnEmptyStdout(boolean useStderrOnEmptyStdout)
A boolean indicating that when stdout is empty, this component will populate the Camel Message Body with stderr.
|
void |
setWorkingDir(String dir)
The directory in which the command should be executed.
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doInit, doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public static final long NO_TIMEOUT
timeout
is used.public ExecEndpoint(String uri, ExecComponent component)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public boolean isSingleton()
public String getExecutable()
public void setExecutable(String executable)
null
.public String getArgs()
public void setArgs(String args)
public String getWorkingDir()
public void setWorkingDir(String dir)
public long getTimeout()
public void setTimeout(long timeout)
public String getOutFile()
public void setOutFile(String outFile)
public ExecCommandExecutor getCommandExecutor()
public void setCommandExecutor(ExecCommandExecutor commandExecutor)
public ExecBinding getBinding()
public void setBinding(ExecBinding binding)
public boolean isUseStderrOnEmptyStdout()
public void setUseStderrOnEmptyStdout(boolean useStderrOnEmptyStdout)
Apache Camel