|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.component.exec.ExecEndpoint
public class ExecEndpoint
The endpoint utilizes an ExecCommandExecutor to execute a system
command when it receives message exchanges.
ExecBinding,
ExecCommandExecutor,
ExecCommand,
ExecResult| Field Summary | |
|---|---|
static long |
NO_TIMEOUT
Indicates that no timeout is used. |
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
ExecEndpoint(String uri,
ExecComponent component)
|
|
| Method Summary | |
|---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor)
|
org.apache.camel.Producer |
createProducer()
|
String |
getArgs()
The arguments may be one or many whitespace-separated tokens, that can be quoted with ", e.g. |
ExecBinding |
getBinding()
|
ExecCommandExecutor |
getCommandExecutor()
|
String |
getExecutable()
|
String |
getOutFile()
|
long |
getTimeout()
|
String |
getWorkingDir()
|
boolean |
isSingleton()
|
boolean |
isUseStderrOnEmptyStdout()
|
void |
setArgs(String args)
Sets the arguments of the executable application |
void |
setBinding(ExecBinding binding)
|
void |
setCommandExecutor(ExecCommandExecutor commandExecutor)
Sets a custom executor to execute commands. |
void |
setExecutable(String executable)
Sets the executable to be executed. |
void |
setOutFile(String outFile)
|
void |
setTimeout(long timeout)
Sets the timeout. |
void |
setUseStderrOnEmptyStdout(boolean useStderrOnEmptyStdout)
|
void |
setWorkingDir(String dir)
Sets the working directory of the executable. |
| Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
|---|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Field Detail |
|---|
public static final long NO_TIMEOUT
timeout is used.
| Constructor Detail |
|---|
public ExecEndpoint(String uri,
ExecComponent component)
| Method Detail |
|---|
public org.apache.camel.Producer createProducer()
throws Exception
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
Exceptionpublic boolean isSingleton()
public String getExecutable()
ExecBinding.EXEC_COMMAND_EXECUTABLEpublic void setExecutable(String executable)
null.
executable - Sets the executable to be executed.public String getArgs()
args="arg 1" arg2" will use two arguments
arg 1 and arg2. To include the quotes use
""args=""arg 1"" arg2 will use the arguments
"arg 1" and arg2.
ExecBinding.EXEC_COMMAND_ARGS,
ExecParseUtils.splitToWhiteSpaceSeparatedTokens(String)public void setArgs(String args)
args - Returns null value if no arguments are
configured in the endpoint URIgetArgs(),
ExecBinding.EXEC_COMMAND_ARGSpublic String getWorkingDir()
null is
such is not set.ExecBinding.EXEC_COMMAND_WORKING_DIRpublic void setWorkingDir(String dir)
dir - the working directory of the executable. null
values indicates that the current working directory will be
used.public long getTimeout()
long. The
default value is NO_TIMEOUTExecBinding.EXEC_COMMAND_TIMEOUTpublic void setTimeout(long timeout)
timeout - The timeout must be a positive longExecBinding.EXEC_COMMAND_TIMEOUTpublic String getOutFile()
null if no out file is set, otherwise returns the
value of the outFileExecBinding.EXEC_COMMAND_OUT_FILEpublic void setOutFile(String outFile)
outFile - a not-empty file pathExecBinding.EXEC_COMMAND_OUT_FILEpublic ExecCommandExecutor getCommandExecutor()
DefaultExecCommandExecutorpublic void setCommandExecutor(ExecCommandExecutor commandExecutor)
commandExecutor - a not-null instance of ExecCommandExecutorpublic ExecBinding getBinding()
public void setBinding(ExecBinding binding)
public boolean isUseStderrOnEmptyStdout()
public void setUseStderrOnEmptyStdout(boolean useStderrOnEmptyStdout)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||