MpnSubscription.fromSubscription constructor
- Subscription sub
Creates an MpnSubscription object copying subscription mode, items, fields and data adapter from the specified real-time 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 Subscription object to copy properties from.
Implementation
MpnSubscription.fromSubscription(Subscription 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();