public class ShellExecReq extends Message
Constructor and Description |
---|
ShellExecReq()
Create an empty request for shell command.
|
ShellExecReq(AgentID to)
Create an empty request for shell command.
|
ShellExecReq(AgentID to,
java.io.File script)
Create request to execute shell script.
|
ShellExecReq(AgentID to,
java.io.File script,
java.util.List<java.lang.String> args)
Create request to execute shell script with arguments.
|
ShellExecReq(AgentID to,
java.lang.String cmd)
Create request for shell command.
|
ShellExecReq(java.io.File script)
Create request to execute shell script.
|
ShellExecReq(java.io.File script,
java.util.List<java.lang.String> args)
Create request to execute shell script with arguments.
|
ShellExecReq(java.lang.String cmd)
Create request for shell command.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAns()
Get the flag that indicates whether the output from the command should be returned in the response,
when possible.
|
java.lang.String |
getCommand()
Get the command to execute.
|
java.util.List<java.lang.String> |
getScriptArgs()
Get the script arguments.
|
java.io.File |
getScriptFile()
Get the script to execute.
|
boolean |
isScript()
Check if the request is for a script.
|
void |
setAns(boolean ans)
Set a flag to indicate that the output from the command should be returned in the response,
when possible.
|
void |
setCommand(java.lang.String cmd)
Set the command to execute.
|
void |
setScript(java.io.File script)
Set the command to execute.
|
void |
setScript(java.io.File script,
java.util.List<java.lang.String> args)
Set the command to execute.
|
getInReplyTo, getJsonCache, getMessageID, getPerformative, getRecipient, getSender, getSentAt, setInReplyTo, setJsonCache, setMessageID, setPerformative, setRecipient, setSender, setSentAt, toString
public ShellExecReq()
public ShellExecReq(AgentID to)
to
- shell agent id.public ShellExecReq(java.lang.String cmd)
cmd
- command to execute.public ShellExecReq(AgentID to, java.lang.String cmd)
to
- shell agent id.cmd
- command to execute.public ShellExecReq(java.io.File script)
script
- script file to execute.public ShellExecReq(AgentID to, java.io.File script)
to
- shell agent id.script
- script file to execute.public ShellExecReq(java.io.File script, java.util.List<java.lang.String> args)
script
- script file to execute.args
- arguments to pass to script.public ShellExecReq(AgentID to, java.io.File script, java.util.List<java.lang.String> args)
to
- shell agent id.script
- script file to execute.args
- arguments to pass to script.public void setCommand(java.lang.String cmd)
cmd
- command to execute.public java.lang.String getCommand()
public void setScript(java.io.File script)
script
- script file to execute.public void setScript(java.io.File script, java.util.List<java.lang.String> args)
script
- script file to execute.args
- arguments to pass to script.public java.io.File getScriptFile()
public java.util.List<java.lang.String> getScriptArgs()
public boolean isScript()
public void setAns(boolean ans)
ans
- true to get output, false otherwisepublic boolean getAns()