Class: Subscription

Subscription

Instances of this class represent a subscription to a data event on a data node of the Webcom Datasync service.

They are built using the Webcom#subscribe method.

Since:
  • 2.10

Methods

cancel() → {Promise.<void>}

Cancels the subscription represented by this instance. This operation is asynchronous, it needs a request to the Webcom back end.

Returns:

The returned promise is resolved as soon as the cancellation of the subscription has been acknowledged by the Webcom back end.

Type
Promise.<void>

update(event) → {Promise.<Subscription>}

Updates the descriptor of data events watched by this subscription. This operation is asynchronous, it needs a request to the Webcom back end.

Parameters:
Name Type Description
event EventDescriptor

The new descriptor of data events this subscription watches.

Returns:

The returned promise is resolved as soon as the update of the subscription has been acknowledged by the Webcom back end.

Type
Promise.<Subscription>
show
deprecated