AppTaskExecutor<TConfig extends AppTask> class
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
Properties
- configuration → TConfig?
-
The configuration of this executor as set in initialize.
no setterinherited
- deployment → SmartphoneDeployment?
-
The deployment that this executor is part of executing.
no setterinherited
-
executors
→ Set<
Executor> -
The set of underlying executors that this aggregate executor is managing.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
measurements
→ Stream<
Measurement> -
The stream of
Measurementcollected by this executor.no setterinherited -
probes
→ List<
Probe> -
The probes in this task executor. Empty for tasks without measures.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingState → SamplingState
-
The runtime sampling state of this executor.
no setterinherited
- state → ExecutorState
-
The runtime state of this executor.
no setterinherited
-
stateEvents
→ Stream<
ExecutorState> -
The runtime state changes of this executor.
no setterinherited
-
states
→ Stream<
ExecutorState> -
The merged state events of all probes in this task executor.
no setterinherited
- task → TConfig
-
The
TaskConfigurationfor this task executor.no setterinherited
Methods
-
addError(
Object error, [StackTrace? stacktrace]) → void -
Logs
erroras a warning and adds it to the measurements stream.inherited -
addExecutor(
Executor executor) → void -
Adds
executorto executors and forwards its measurements.inherited -
addMeasurement(
Measurement measurement) → void -
Adds
measurementto the measurements stream.inherited -
dispose(
) → void -
Disposes this executor.
inherited
-
error(
) → void -
Moves this executor to ExecutorState.Undefined.
inherited
-
initialize(
TConfig configuration, [SmartphoneDeployment? deployment]) → void -
Configures and initializes the executor. Call before resume.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
) → Future< void> -
Callback when this executor is disposed.
inherited
-
onInitialize(
) → bool -
Called by initialize. Returns true if successfully initialized.
override
-
onPause(
) → Future< bool> -
Called by pause. Returns true if successfully paused.
override
-
onResume(
) → Future< bool> -
Called by resume. Returns true if successfully resumed.
override
-
pause(
) → void -
Pauses the executor until resume is called.
inherited
-
pauseButShouldBeResumed(
) → void -
Pauses the executor and marks it to be resumed later.
inherited
-
removeExecutor(
Executor executor) → void -
Removes
executorfrom executors and stops forwarding its measurements.inherited -
resume(
) → void -
Starts or resumes the executor.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited