MpnSubscription class

Class representing a Mobile Push Notifications (MPN) subscription to be submitted to the MPN Module of a Lightstreamer Server.

It contains subscription details and the listener needed to monitor its status. Real-time data is routed via native push notifications.
In order to successfully subscribe an MPN subscription, first an MpnDevice must be created and registered on the LightstreamerClient with LightstreamerClient.registerForMpn.
After creation, an MpnSubscription object is in the "inactive" state. When an MpnSubscription object is subscribed to on an LightstreamerClient object, through the LightstreamerClient.subscribe method, its state switches to "active". This means that the subscription request is being sent to the Lightstreamer Server. Once the server accepted the request, it begins to send real-time events via native push notifications and the MpnSubscription object switches to the "subscribed" state.
If a trigger expression is set, the MPN subscription does not send any push notifications until the expression evaluates to true. When this happens, the MPN subscription switches to "triggered" state and a single push notification is sent. Once triggered, no other push notifications are sent.
When an MpnSubscription is subscribed on the server, it acquires a permanent subscription ID that the server later uses to identify the same MPN subscription on subsequent sessions.
An MpnSubscription 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. The same rules that apply to Subscription apply to MpnSubscription.
An MpnSubscription object can also be provided by the client to represent a pre-existing MPN subscription on the server. In fact, differently than real-time subscriptions, MPN subscriptions are persisted on the server's MPN Module database and survive the session they were created on.
MPN subscriptions are associated with the MPN device, and after the device has been registered the client retrieves pre-existing MPN subscriptions from the server's database and exposes them with the LightstreamerClient.getMpnSubscriptions method.

Available Extensions
Annotations

Constructors

MpnSubscription(String mode, [List<String>? items, List<String>? fields])
Creates an object to be used to describe an MPN subscription that is going to be subscribed to through the MPN Module of Lightstreamer Server.
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

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