Executor<TConfig> class abstract

A Executor is responsible for executing data collection based on a configuration TConfig.

The behavior of an executor is controlled by its life-cycle methods: initialize, resume, pause, and dispose. A paused executor can be resumed again.

The state property reveals the probe's current state. The stateEvents is a stream of state changes which can be listen to as a broadcast stream.

If an error occurs the state of a probe becomes undefined. This is, for example, used when an exception occurs.

An Executor returns collected data in the measurements stream. This is the main usage of an executor. For example, to listens to all measurements generated in all studies running in a client, use:

SmartPhoneClientManager().measurements.listen(
   (measurement) => print(measurement),
);
Implementers

Constructors

Executor()

Properties

configuration → TConfig?
The configuration of this executor as set in initialize.
no setter
deployment SmartphoneDeployment?
The deployment that this executor is part of executing.
no setter
hashCode int
The hash code for this object.
no setterinherited
measurements Stream<Measurement>
The stream of Measurement collected by this executor.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
samplingState SamplingState
The runtime sampling state of this executor.
no setter
state ExecutorState
The runtime state of this executor.
no setter
stateEvents Stream<ExecutorState>
The runtime state changes of this executor.
no setter

Methods

dispose() → void
Dispose of this executor.
initialize(TConfig configuration, [SmartphoneDeployment? deployment]) → void
Configure and initialize the executor before using it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Pause the executor. Paused until resume is called.
pauseButShouldBeResumed() → void
Pause the executor but mark it to be resumed when possible.
resume() → void
Resume the executor.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited