These docs are for v7.0.0. Click to read the latest docs for v7.5.0.

Activities APIs

The Activity-related APIs are exposed by the com.eurotech.framework.activity.api bundle.

989

The Activity interface maps the corresponding API in Everyware Cloud. This will ease the user/developer understanding of the elements involved in the update process, while keeping the two projects aligned on equivalent concepts.

An Activity is identified by an ID that is the same ID tracked by Everyware Cloud and that can help keep track of the different requests and statuses.
An Activity is also characterized by a set of Properties specified during the Activity creation and that allow to keep track of the current status as well as they are used for persistence.
Once created, an Activity can be started. During its lifetime a cancel request can be received and managed by the cancel method.
Based on the State Pattern, an Activity has a State that is represented by the ActivityState. The implementation of the ActivityState manages the behaviour of the Activity.

Each Activity instance is managed by the ActivityService. The API allows to create a new Activity, but also to list all the available activities or a single one, based on the provided ID.
As a design choice, it is not possible to delete an Activity: the space required to keep the state of an activity is limited and having all the history of the activities performed can allow to understand the set of changes applied to the target device.

The com.eurotech.framework.activity.api bundle provides also some other packages containing APIs related to APIs.
The org.eclipse.kura.activity.event package groups all the Activity-related events.
The org.eclipse.kura.activity.event.stream contains APIs related to streams of Events that can be managed by Activities.
org.eclipse.kura.notification and `org.eclipse.kura.notification.message packages deal with notification update messages, their creation and corresponding publishers.