SmartphoneDeploymentExecutor class
Runs a SmartphoneDeployment: the root of the executor tree of a study.
Each SmartphoneStudyController owns one. On initialize it creates a TaskControlExecutor for each task control in the deployment and tells the target device's DeviceManager about it. You rarely use it directly; go through SmartphoneStudyController instead.
Key points:
- Task controls with an AppTask and a
Schedulabletrigger get an AppTaskControlExecutor;MonitoringTasks get no executor. - measurements merges all measurements of the deployment and adds a CompletedAppTask measurement each time a UserTask is done.
- On resume, each task control is resumed or paused according to the sampling state set with setSamplingState, if any. Then the buffered app tasks are enqueued in the AppTaskController.
See also Executor for the lifecycle.
- Inheritance
-
- Object
- AbstractExecutor<
SmartphoneDeployment> - AggregateExecutor<
SmartphoneDeployment> - SmartphoneDeploymentExecutor
Constructors
Properties
- configuration → SmartphoneDeployment?
-
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> -
All probes in this deployment executor. May be empty.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingState → SmartphoneDeploymentExecutorSamplingState
-
The runtime sampling state of this executor.
no setteroverride
- state → ExecutorState
-
The runtime state of this executor.
no setterinherited
-
stateEvents
→ Stream<
ExecutorState> -
The runtime state changes of this 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 -
addMeasurements(
Stream< Measurement> measurements) → void -
Adds
measurementsto themeasurementsof this deployment executor. -
clearSamplingStatus(
) → void - Clears the state set with setSamplingState.
-
dispose(
) → void -
Disposes this executor.
inherited
-
error(
) → void -
Moves this executor to ExecutorState.Undefined.
inherited
-
getDeviceManagerFromRoleName(
String? roleName) → DeviceManager< DeviceConfiguration< ?DeviceRegistration> , DeviceRegistration> -
Returns the DeviceManager of the device with
roleName. -
initialize(
SmartphoneDeployment configuration, [SmartphoneDeployment? deployment]) → void -
Configures and initializes the executor. Call before resume.
inherited
-
lookupProbe(
String type) → List< Probe> -
Returns all probes of data
type. Returns an empty list if none are found. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
) → Future< void> -
Callback when this executor is disposed.
override
-
onInitialize(
) → bool -
Called by initialize. Returns true if successfully initialized.
override
-
onPause(
) → Future< bool> -
Called by pause. Returns true if successfully paused.
inherited
-
onResume(
) → Future< bool> -
Resumes sampling based on the samplingState of the deployment.
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
-
setSamplingState(
SmartphoneDeploymentExecutorSamplingState? samplingState) → void - Sets the sampling state to restore on the next resume.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited