Task¶
-
public class
Task¶ A task is set of actions that are executed in response to a trigger. The actions and the trigger are defined by their respective
Channels.
Constructors¶
Task¶
-
public
Task(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions)¶ Constructor.
Parameters: - name – the task name
- trigger – the task trigger
- actions – the list of related actions
Task¶
-
public
Task(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions, TaskConfig taskConfig, boolean enabled, boolean hasRegisteredChannel)¶
Task¶
-
public
Task(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions, TaskConfig taskConfig, boolean enabled, boolean hasRegisteredChannel, List<String> days)¶ Constructor.
Parameters: - name – the task name
- trigger – the task trigger
- actions – the list of related actions
- taskConfig – the task configuration
- enabled – defines if this task is enabled
- hasRegisteredChannel – defines if this task has a registered channel
Methods¶
addAction¶
-
public void
addAction(TaskActionInformation action)¶ Stores the given action.
Parameters: - action – the action
getActions¶
-
public List<TaskActionInformation>
getActions()¶
getTaskConfig¶
-
public TaskConfig
getTaskConfig()¶
getTrigger¶
-
public TaskTriggerInformation
getTrigger()¶
incrementFailuresInRow¶
-
public void
incrementFailuresInRow()¶ Increases the counter of task execution failures that occurred since the last successful execution of this task or since the task was enabled.
resetFailuresInRow¶
-
public void
resetFailuresInRow()¶ Resets the counter of task execution failures that occurred since the last successful execution of this task or since the task was enabled.
setActions¶
-
public void
setActions(List<TaskActionInformation> actions)¶
setRetryIntervalInMilliseconds¶
-
public void
setRetryIntervalInMilliseconds(int retryIntervalInMilliseconds)¶
setTaskConfig¶
-
public void
setTaskConfig(TaskConfig taskConfig)¶
setTrigger¶
-
public void
setTrigger(TaskTriggerInformation trigger)¶