@FunctionalInterface public interface ObservableSubscriptionChangeListener
ObservableSubscription instance,
thus all changes for a given subscription are synchronized with respect to each other.
symbolsAdded(Set) and symbolsRemoved(Set)
are decorated depending on the actual implementation class of DXFeedSubscription.
DXFeedTimeSeriesSubscription decorates original subscription symbols by wrapping them
into instances of TimeSeriesSubscriptionSymbol class.
equals method. When one symbol in subscription is
replaced by the other one that is equal to it, then the decision of whether to issue
symbolsAdded notification is up to implementation.
In particular, DXFeedSubscription uses its implementation of
shallNotifyOnSymbolUpdate method
to figure out what to do in this case. Its default implementation is designed so that repeated
additions of the same String symbol do not result in notification, while
repeated additions of FilteredSubscriptionSymbol instances like TimeSeriesSubscriptionSymbol objects
get notification.
However, the implementation that is returned by
DXPublisher.getSubscription can generate repeated
symbolsAdded notifications to
its listeners for the same symbols without the corresponding
symbolsRemoved
notifications in between them. It happens when subscription disappears, cached data is lost, and subscription
reappears again. On each symbolsAdded
notification data provider shall publish the most recent events for
the corresponding symbols.
WildcardSymbol.ALL object.
See WildcardSymbol for details.| Modifier and Type | Method and Description |
|---|---|
default void |
subscriptionClosed()
Invoked after subscription is closed or when this listener is
removed from the subscription. |
void |
symbolsAdded(Set<?> symbols)
Invoked after a collection of symbols is added to a subscription.
|
default void |
symbolsRemoved(Set<?> symbols)
Invoked after a collection of symbols is removed from a subscription.
|
void symbolsAdded(Set<?> symbols)
default void symbolsRemoved(Set<?> symbols)
default void subscriptionClosed()
removed from the subscription.
DXPublisher subscription is considered to be closed
when the corresponding DXEndpoint is closed.
Default implementation is empty.Copyright © 2002–2023 Devexperts LLC. All rights reserved.