new ShouldStartCommand(commandID, data)
Checks if wbt should be started.
This command needs checker method (_shouldStart) that returns true/false
And method that will be called if WBT cant't be started (_onCantStart).
Aditionally scopes for methods cn be added.
Default behaviour can be override by seting property in config 'boot:{startAlways:true/false}'
Parameters:
| Name | Type | Description |
|---|---|---|
commandID |
string | command id |
data |
chaining.CommandDataVO | undefined | command data |
Extends
Members
-
<readonly> dispatcher
-
Dispatcher to recieve signals from the command
- Inherited From:
- Default Value:
-
- null
Properties:
Type Description coreutils.Signal -
<readonly> running
-
Indicates if the command is executed and not ready yet.
- Inherited From:
- Default Value:
-
- false
Properties:
Type Description boolean
Methods
-
<protected> _complete()
-
Called when command completed its task. Sends ready event and if autoDestroy is true then destroys command
- Inherited From:
-
<protected> _error(msg)
-
Called when command can't complete its task. Sends error event and if autoDestroy is true then desotry command
Parameters:
Name Type Description msgstring | null error message - Inherited From:
-
<abstract, protected> _execute()
-
Execute command. Override this method to execute specific task
- Inherited From:
-
<protected> _getProperty(propertyID)
-
Get property
Parameters:
Name Type Description propertyIDstring id of property - Inherited From:
Returns:
value of property- Type
- * | null
-
<protected> _hasProperty(propertyID)
-
Check if commands has proeprty
Parameters:
Name Type Description propertyIDstring id of property - Inherited From:
Returns:
has/hasn't- Type
- boolean
-
addProperty(id, value)
-
Add proeprty to the command
Parameters:
Name Type Description idstring id of the property value* value of the property - Inherited From:
Returns:
returns self for chaining -
destroy()
-
Destroy command object and release resources
- Inherited From:
-
removeProperty(id)
-
Remove property of the command
Parameters:
Name Type Description idstring id of the property - Inherited From:
Returns:
returns self for chaining -
start()
-
Start execution of the comamnd
- Inherited From:
-
stop()
-
Stop execution of the comamnd
- Inherited From: