Observable set of subscription symbols.
virtual std::size_t ObservableSubscription::addChangeListener |
( |
std::shared_ptr< ObservableSubscriptionChangeListener > | listener | ) |
|
|
pure virtual |
Adds subscription change listener.
This method does nothing if subscription is closed. Otherwise, it installs the corresponding listener and immediately invokes ObservableSubscriptionChangeListener::symbolsAdded() on the given listener while holding the lock for this subscription. This way the given listener synchronously receives existing subscription state and is synchronously notified on all changes in subscription afterwards.
- Parameters
-
listener | The subscription change listener. |
- Returns
- The listener id
Implemented in DXFeedSubscription.
virtual void ObservableSubscription::removeChangeListener |
( |
std::size_t | id | ) |
|
|
pure virtual |
Removes subscription change listener by id.
This method does nothing if the listener with the given id was not installed or was already removed as subscription change listener for this subscription. Otherwise, it removes the corresponding listener and immediately invokes ObservableSubscriptionChangeListener::subscriptionClosed() on the given listener while holding the lock for this subscription.
- Parameters
-
id | The subscription change listener id. |
Implemented in DXFeedSubscription.