Subscription class
Class representing a Subscription to be submitted to a Lightstreamer Server.
It contains subscription details and the listeners needed to process the real-time data.
After the creation, a Subscription object is in the "inactive" state. When a Subscription
object is subscribed to on a LightstreamerClient object, through the
LightstreamerClient.subscribe method, its state becomes "active".
This means that the client activates a subscription to the required items through
Lightstreamer Server and the Subscription object begins to receive real-time events.
A Subscription can be configured to use either an Item Group or an Item List to specify the
items to be subscribed to and using either a Field Schema or Field List to specify the fields.
"Item Group" and "Item List" are defined as follows:
- "Item Group": an Item Group is a String identifier representing a list of items.
Such Item Group has to be expanded into a list of items by the getItems method of the
MetadataProvider of the associated Adapter Set. When using an Item Group, items in the
subscription are identified by their 1-based index within the group.
It is possible to configure the Subscription to use an "Item Group" using the [setItemGroup] method. - "Item List": an Item List is an array of Strings each one representing an item.
For the Item List to be correctly interpreted a LiteralBasedProvider or a MetadataProvider
with a compatible implementation of getItems has to be configured in the associated
Adapter Set.
Note that no item in the list can be empty, can contain spaces or can be a number.
When using an Item List, items in the subscription are identified by their name or by their 1-based index within the list.
It is possible to configure the Subscription to use an "Item List" using the [setItems] method or by specifying it in the constructor.
- "Field Schema": a Field Schema is a String identifier representing a list of fields.
Such Field Schema has to be expanded into a list of fields by the getFields method of
the MetadataProvider of the associated Adapter Set. When using a Field Schema, fields
in the subscription are identified by their 1-based index within the schema.
It is possible to configure the Subscription to use a "Field Schema" using the [setFieldSchema] method. - "Field List": a Field List is an array of Strings each one representing a field.
For the Field List to be correctly interpreted a LiteralBasedProvider or a MetadataProvider
with a compatible implementation of getFields has to be configured in the associated
Adapter Set.
Note that no field in the list can be empty or can contain spaces.
When using a Field List, fields in the subscription are identified by their name or by their 1-based index within the list.
It is possible to configure the Subscription to use a "Field List" using the [setFields] method or by specifying it in the constructor.
- Available Extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited