public interface TaskBuilder
TaskBuilder
objects can be instantiated via the MassManagementEngine.createTaskBuilder(String)
method.
Example:
RuleEngine engine = ...
TaskBuilder builder = engine.createTaskBuilder("My Task");
builder.setDeviceScope("ROOT/test", null)
.setAction("target.consoleCommand('config.ls')")
.launchTask();
Modifier and Type | Method and Description |
---|---|
CompletionStage<Task> |
launchTask()
Assembles all Task parameters set via this builder and launches the built Task.
|
TaskBuilder |
setAction(String actionType,
org.eclipse.ditto.json.JsonObject actionDef)
Defines the Task action.
|
TaskBuilder |
setConcurrency(int limit,
int timeoutSeconds)
Defines concurrency limit execution option.
|
TaskBuilder |
setDeviceIdsList(String... deviceIds)
Deprecated.
pls use public TaskBuilder setDeviceScopeIdsList(String... deviceIds);
|
TaskBuilder |
setDeviceScopeFilter(String filter) |
TaskBuilder |
setDeviceScopeFilterNamespaces(String namespaces) |
TaskBuilder |
setDeviceScopeFilterOption(String option) |
TaskBuilder |
setDeviceScopeGroup(Optional<String> groupId) |
TaskBuilder |
setDeviceScopeIdsList(String... deviceIds) |
TaskBuilder |
setDeviceScopeIsMemberScript(String isMemberScript) |
TaskBuilder |
setDeviceScopeListingScript(String listingScript) |
TaskBuilder |
setSystemScope()
Sets the built-up Task to have System scope.
|
TaskBuilder |
setTimeConstraint(String timeConstraint)
Defines at what time-schedule it is permitted for the Task to act.
|
TaskBuilder setSystemScope()
TaskBuilder
having the changes applied.TaskBuilder setDeviceScopeGroup(Optional<String> groupId)
TaskBuilder setDeviceScopeFilter(String filter)
TaskBuilder setDeviceScopeFilterOption(String option)
TaskBuilder setDeviceScopeFilterNamespaces(String namespaces)
TaskBuilder setDeviceScopeIsMemberScript(String isMemberScript)
TaskBuilder setDeviceScopeListingScript(String listingScript)
TaskBuilder setDeviceScopeIdsList(String... deviceIds)
TaskBuilder setDeviceIdsList(String... deviceIds)
deviceIds
- device idsTaskBuilder setConcurrency(int limit, int timeoutSeconds)
limit
- concurrency limit number.timeoutSeconds
- timeout after which the execution if not confirmed is removed from concurrency number
and space is freed for other one.TaskBuilder
having the changes applied.TaskBuilder setTimeConstraint(String timeConstraint)
timeConstraint
- time schedule constraint definition.TaskBuilder
having the changes applied.TaskBuilder setAction(String actionType, org.eclipse.ditto.json.JsonObject actionDef)
actionType
- type of the action provider.actionDef
- the Task action provided as json object.TaskBuilder
having the changes applied.CompletionStage<Task> launchTask()
Task
object representing the launched Task.IllegalArgumentException
- if Task parameters are inconsistent or not correct.Copyright © 2022 Bosch.IO GmbH. All rights reserved.