Constructor
new Command(resultnon-null, onKill)
Name | Type | Description |
---|---|---|
result | Promise.<!Result> | The command result. |
onKill | function | The function to call when #kill() is called. |
- Source
Methods
getName() → {string}
- Source
This command's name.
- Type:
- string
getParameter(key) → {*}
Returns a named command parameter.
Name | Type | Description |
---|---|---|
key | string | The parameter key to look up. |
- Source
The parameter value, or undefined if it has not been set.
- Type:
- *
getParameters() → (non-null) {Object.<*>}
- Source
The parameters to send with this command.
- Type:
- Object.<*>
kill(opt_signalopt)
Sends a signal to the underlying process.
Name | Type | Attributes | Description |
---|---|---|---|
opt_signal | string | <optional> | The signal to send; defaults to |
- Source
result() → (non-null) {Promise.<!Result>}
- Source
A promise for the result of this command.
- Type:
- Promise.<!Result>
setParameter(name, value) → (non-null) {Command}
Sets a parameter to send with this command.
Name | Type | Description |
---|---|---|
name | string | The parameter name. |
value | * | The parameter value. |
- Source
A self reference.
- Type:
- Command
setParameters(parametersnon-null) → (non-null) {Command}
Sets the parameters for this command.
Name | Type | Description |
---|---|---|
parameters | Object.<*> | The command parameters. |
- Source
A self reference.
- Type:
- Command