- Since:
- 2.10
Members
(static) Child :EventDescriptor
Creates an event descriptor whose associated subscriptions will raise events as soon as something changes among
the children of the watched data node. The changes to watch on the children nodes must be specified by calling
further one or more of the EventDescriptor#Addition, EventDescriptor#Removal and
EventDescriptor#Change members on the returned object.
This field creates a new instance of EventDescriptor that is intended to be used as first parameter of
the Webcom#subscribe method.
Type:
- See:
-
- Webcom#subscribe
EventDescriptor#Addition,EventDescriptor#Removal,EventDescriptor#Changeto refine the createdEventDescriptorinstance
(static) ValueChange :EventDescriptor
Creates an event descriptor whose associated subscriptions will raise events as soon as the value of the watched data node changes. The corresponding sent notifications will contain the new value of the data node.
This field creates a new instance of EventDescriptor that is intended to be used as first parameter of
the Webcom#subscribe method. It can also be combine further with EventDescriptor#WithoutData.
Type:
- See:
-
- Webcom#subscribe
EventDescriptor#WithoutDatato refine the createdEventDescriptorinstance
Addition :EventDescriptor
Creates an event descriptor whose associated subscriptions will raise events as soon as a new child is added to the watched data node. The corresponding sent notifications will contain the list of the newly added children as well as their values.
Note: this member is available only on EventDescriptor instances created with the
EventDescriptor.Child property or one of the EventDescriptor#Addition,
EventDescriptor#Removal and EventDescriptor#Change members.
The created instances can be combined further with EventDescriptor#Removal and
EventDescriptor#Change.
Type:
Change :EventDescriptor
Creates an event descriptor whose associated subscriptions will raise events as soon as a the value of a child of the watched data node is updated. The corresponding sent notifications will contain the list of the just updated children as well as their updated values.
Note: this member is available only on EventDescriptor instances created with the
EventDescriptor.Child property or one of the EventDescriptor#Addition,
EventDescriptor#Removal and EventDescriptor#Change members.
The created instances can be combined further with EventDescriptor#Removal and
EventDescriptor#Change.
Type:
Removal :EventDescriptor
Creates an event descriptor whose associated subscriptions will raise events as soon as a new child is removed from the watched data node. The corresponding sent notifications will contain the list of the just removed children.
Note: this member is available only on EventDescriptor instances created with the
EventDescriptor.Child property or one of the EventDescriptor#Addition,
EventDescriptor#Removal and EventDescriptor#Change members.
The created instances can be combined further with EventDescriptor#Removal and
EventDescriptor#Change.
Type:
WithoutData :EventDescriptor
Creates an event descriptor whose associated subscriptions will raise events as soon as the value of the watched
data node changes, similarly to the EventDescriptor.ValueChange field. However the corresponding sent
notifications will be very lightweight and contain no data.
Note: this member is available only on EventDescriptor instances created with the
EventDescriptor.ValueChange property.
Type:
Methods
excludeRevocations() → {EventDescriptor}
Specifies that the revocations of the subscriptions associated with this EventDescriptor instance will
not be watched (and so, will not be notified to the subscribing targets). Subscriptions are typically revoked as
soon as the deadline of the watched event is passed (see the EventDescriptor#until method) or when the
security rules forbid to read the watched data.
Returns:
This EventDescriptor instance updated.
- Type
- EventDescriptor
for(durationSeconds) → {EventDescriptor}
Adds a relative deadline timestamp (interpreted relatively to the time when this method is called) to this
EventDescriptor instance.
As soon as this deadline is passed, all subscriptions associated with this event descriptor will expire.
Parameters:
| Name | Type | Description |
|---|---|---|
durationSeconds |
number | The duration, expressed in seconds. |
Returns:
This EventDescriptor instance updated with the specified deadline.
- Type
- EventDescriptor
until(dateOrTimestampSeconds) → {EventDescriptor}
Adds an absolute deadline timestamp to this EventDescriptor instance. As soon as this deadline is passed,
all subscriptions associated with this event descriptor will expire.
Parameters:
| Name | Type | Description |
|---|---|---|
dateOrTimestampSeconds |
number | Date | The deadline. It may be specified as a timestamp in seconds since
Unix Epoch, or as a javascript |
- See:
Returns:
This EventDescriptor instance updated with the specified deadline.
- Type
- EventDescriptor