MpnSubscription.fromMpnSubscription constructor

MpnSubscription.fromMpnSubscription(
  1. MpnSubscription sub
)

Creates an MPNSubscription object copying all properties from the specified MPN subscription.

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, except setTriggerExpression and setNotificationFormat, can only be called while the instance is in the "inactive" state.

  • sub The MpnSubscription object to copy properties from.

Implementation

MpnSubscription.fromMpnSubscription(MpnSubscription sub) :
  _id = _nextMpnSubId(),
  _mode = sub.getMode(),
  _items = sub.getItems()?.toList(),
  _fields = sub.getFields()?.toList(),
  _group = sub.getItemGroup(),
  _schema = sub.getFieldSchema(),
  _dataAdapter = sub.getDataAdapter(),
  _bufferSize = sub.getRequestedBufferSize(),
  _requestedMaxFrequency = sub.getRequestedMaxFrequency(),
  _trigger = sub.getTriggerExpression(),
  _notificationFormat = sub.getNotificationFormat();