ClientManager<TPrimaryDevice extends PrimaryDeviceConfiguration<TRegistration>, TRegistration extends DeviceRegistration, TStudy extends Study<PrimaryDeviceDeployment>> class abstract

Allows managing studies on a client device.

Implementers

Constructors

ClientManager({ClientRepository<TStudy>? repository, DeploymentService? deploymentService, DeviceDataCollectorFactory? dataCollectorFactory})
Create a new ClientManager.

Properties

dataCollectorFactory DeviceDataCollectorFactory?
Determines which DeviceDataCollector to use to collect data locally on this primary device and this factory is used to create ConnectedDeviceDataCollector instances for connected devices.
no setter
deploymentService DeploymentService
The application service through which study deployments, to be run on this client, can be managed and retrieved.
no setter
hashCode int
The hash code for this object.
no setterinherited
isConfigured bool
Determines whether a DeviceRegistration has been configured for this client, which is necessary to start adding studies.
no setter
proxy StudyDeploymentProxy?
getter/setter pair
registration → TRegistration
The registration of this client.
no setter
repository ClientRepository<TStudy>
Repository within which the state of this client is stored.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
studies List<TStudy>
Get the studies running on this client device.
no setter

Methods

addStudy(TStudy study) Future<TStudy>
Add a study which needs to be executed on this client. No deployment is attempted yet.
configure({required TRegistration registration, DeploymentService? deploymentService, DeviceDataCollectorFactory? dataCollectorFactory}) Future<void>
Configure this ClientManager by specifying a registration for this client device.
getStudy(String studyDeploymentId, String deviceRoleName) → TStudy?
Get the study with studyDeploymentId and deviceRoleName from this client manager. Returns null if no such study has been added.
getStudyDeploymentStatus(TStudy study) Future<StudyDeploymentStatus?>
Get the deployment status for the study from the deployment service. This updates the study's deployment status and sets the study's status accordingly. Returns null if the deployment status could not be retrieved from the deployment service or if the study has not been added to this client manager.
getStudyStatusList() List<StudyStatus>
Get the status for the studies which run on this client device. Note that is the current status, and reflects the latest known status. If you want an updated status from the deployment service, use getStudyDeploymentStatus for each study.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeStudy(String studyDeploymentId, String deviceRoleName) Future<void>
Remove the study with studyDeploymentId and deviceRoleName from this client manager.
stopStudy(String studyDeploymentId, String deviceRoleName) Future<StudyStatus>
Permanently stop collecting data for the study with id studyDeploymentId and mark it as stopped.
toString() String
A string representation of this object.
inherited
tryDeployment(String studyDeploymentId, String deviceRoleName) Future<StudyStatus>
Verifies whether the device is ready for deployment of the study runtime identified by studyDeploymentId and deviceRoleName, and in case it is, deploys. In case already deployed, nothing happens and the status of the deployment is returned.

Operators

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