public class CommandSender extends SenderWithParametersBase
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
CommandSender() |
Modifier and Type | Method and Description |
---|---|
String |
getCommand() |
boolean |
getCommandWithArguments() |
int |
getTimeOut() |
boolean |
isSynchronous()
When
true , the result of sendMessage is the reply of the request. |
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
void |
setCommand(String string)
The command to be executed.
|
void |
setCommandWithArguments(boolean commandWithArguments)
In case the command that will be executed contains arguments then this flag should be set to true
|
void |
setTimeOut(int timeOut)
The number of seconds to execute a command.
|
addParameter, checkStringAttributeOrParameter, configure, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
close, createBean, getLogPrefix, getName, open, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, open, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the reply-message | the messageId of the message sent |
the correlationID specified with sendMessage() | may be ignored | is sent with the message |
a {link TimeOutException} | may be thrown if a timeout occurs waiting for a reply | should not be expected |
Multiple objects may try to call this method at the same time, from different threads.
Implementations of this method should therefore be thread-safe, or synchronized
.
SenderException
TimeoutException
public boolean isSynchronous()
ISender
true
, the result of sendMessage is the reply of the request.public void setCommand(String string)
public String getCommand()
public void setTimeOut(int timeOut)
public int getTimeOut()
public void setCommandWithArguments(boolean commandWithArguments)
public boolean getCommandWithArguments()
Copyright © 2023 Frank!Framework. All rights reserved.