ExecutorFactory class

A factory that holds the set of trigger and task executors used in all deployments. Accessed as a singleton using ExecutorFactory().

Use getTaskExecutor to get or create a new task executor. Use getTriggerExecutor to get an existing trigger executor. Use createTriggerExecutor to get create a new trigger executor using the available TriggerFactorys.

Note that each deployment needs its own set of trigger and task executors. This is because trigger and task executors can be reused across task controls in the same study deployment.

Therefore, each SmartphoneDeploymentExecutor has its own ExecutorFactory in order to avoiding executors to be reused across deployments (if the trigger or task has the same id/name).

Constructors

ExecutorFactory()
Get the singleton instance of ExecutorFactory.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createTriggerExecutor(String studyDeploymentId, int triggerId, TriggerConfiguration trigger) TriggerExecutor<TriggerConfiguration>?
Create a TriggerExecutor based on the studyDeploymentId and triggerId. Returns null if trigger is not supported by any registered TriggerFactory factories.
dispose() → void
Dispose of all trigger and task executors.
getTaskExecutor(String studyDeploymentId, TaskConfiguration task) TaskExecutor<TaskConfiguration>?
Get the TaskExecutor for a task based on the task name. If the task executor does not exist, a new one is created based on the type of the task. Returns null if the type of task is unknown.
getTriggerExecutor(String studyDeploymentId, int triggerId) TriggerExecutor<TriggerConfiguration>?
Get a TriggerExecutor based on the studyDeploymentId and triggerId. Returns null if not found.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerTriggerFactory(TriggerFactory factory) → void
Register factory which can create TriggerExecutors for the specified TriggerFactory runtime types.
toString() String
A string representation of this object.
inherited

Operators

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