AppTaskExecutor
Runs an AppTask by putting it on the AppTaskController queue.
Each time it is resumed (e.g. by a PeriodicTrigger), the executor is wrapped in a new UserTask and enqueued. The app then starts, cancels or finishes the task with UserTask.onStart, UserTask.onCancel and UserTask.onDone. The executor pauses itself again after 5 seconds, so it can be resumed by the next trigger.
Special-purpose UserTasks are created by a UserTaskFactory registered with AppTaskController.registerUserTaskFactory.
- Inheritance
-
- Object
- AbstractExecutor<
TConfig> - AggregateExecutor<
TConfig> - TaskExecutor<
TConfig> - AppTaskExecutor
Constructors
AppTaskExecutor
Properties
probes
The probes in this task executor. Empty for tasks without measures.
Methods
onInitialize
Called by initialize. Returns true if successfully initialized.
If false, the executor stays in ExecutorState.Created. This is a synchronous method and must be light-weight.
onPause
Called by pause. Returns true if successfully paused.
If false, the state is not changed.
onResume
Called by resume. Returns true if successfully resumed.
If false, the executor moves to ExecutorState.PausedButShouldBeResumed.