MpnSubscription constructor

MpnSubscription(
  1. String mode, [
  2. List<String>? items,
  3. 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.

The object can be supplied to LightstreamerClient.subscribe in order to bring the MPN subscription to "active" state.
Note that all of the methods used to describe the subscription to the server can only be called while the instance is in the "inactive" state.

  • mode The subscription mode for the items, required by Lightstreamer Server. Permitted values are:
  • MERGE
  • DISTINCT
- [items] An array of items to be subscribed to through Lightstreamer Server. It is also possible specify the "Item List" or "Item Group" later through [MpnSubscription.setItems] and [setItemGroup]. - [fields] An array of fields for the items to be subscribed to through Lightstreamer Server. It is also possible to specify the "Field List" or "Field Schema" later through [MpnSubscription.setFields] and [setFieldSchema].

Throws IllegalArgumentException If no or invalid subscription mode is passed.

Throws IllegalArgumentException If either the items or the fields array is left null.

Throws IllegalArgumentException If the specified "Item List" or "Field List" is not valid; see MpnSubscription.setItems and MpnSubscription.setFields for details.

Implementation

external factory MpnSubscription(String mode, [List<String>? items, List<String>? fields]);