subscribe method
Operation method that adds a Subscription to the list of "active" Subscriptions. The Subscription cannot already be in the "active" state.
Active subscriptions are subscribed to through the server as soon as possible (i.e. as soon as there is a session available). Active Subscription are automatically persisted across different sessions as long as a related unsubscribe call is not issued.
Lifecycle Subscriptions can be given to the LightstreamerClient at any time. Once done the Subscription
immediately enters the "active" state.
Once "active", a Subscription instance cannot be provided again to a LightstreamerClient unless it is
first removed from the "active" state through a call to unsubscribe.
Also note that forwarding of the subscription to the server is made in a separate thread.
A successful subscription to the server will be notified through a SubscriptionListener.onSubscription
event.
-
sub
A Subscription object, carrying all the information needed to process real-time values. -
See unsubscribe
Implementation
external void subscribe(Subscription sub);