SubscriptionListener class

Interface to be implemented to listen to Subscription events comprehending notifications of subscription/unsubscription, updates, errors and others.

Events for these listeners are dispatched by a different thread than the one that generates them. This means that, upon reception of an event, it is possible that the internal state of the client has changed. On the other hand, all the notifications for a single LightstreamerClient, including notifications to ClientListeners, SubscriptionListeners and ClientMessageListeners will be dispatched by the same thread.

Constructors

SubscriptionListener()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClearSnapshot(String itemName, int itemPos) → void
Event handler that is called by Lightstreamer each time a request to clear the snapshot pertaining to an item in the Subscription has been received from the Server.
onCommandSecondLevelItemLostUpdates(int lostUpdates, String key) → void
Event handler that is called by Lightstreamer to notify that, due to internal resource limitations, Lightstreamer Server dropped one or more updates for an item that was subscribed to as a second-level subscription.
onCommandSecondLevelSubscriptionError(int errorCode, String errorMessage, String key) → void
Event handler that is called when the Server notifies an error on a second-level subscription.
onEndOfSnapshot(String itemName, int itemPos) → void
Event handler that is called by Lightstreamer to notify that all snapshot events for an item in the Subscription have been received, so that real time events are now going to be received.
onItemLostUpdates(String itemName, int itemPos, int lostUpdates) → void
Event handler that is called by Lightstreamer to notify that, due to internal resource limitations, Lightstreamer Server dropped one or more updates for an item in the Subscription.
onItemUpdate(ItemUpdate update) → void
Event handler that is called by Lightstreamer each time an update pertaining to an item in the Subscription has been received from the Server.
onListenEnd() → void
Event handler that receives a notification when the SubscriptionListener instance is removed from a Subscription through Subscription.removeListener.
onListenStart() → void
Event handler that receives a notification when the SubscriptionListener instance is added to a Subscription through Subscription.addListener.
onRealMaxFrequency(String? frequency) → void
Event handler that is called by Lightstreamer to notify the client with the real maximum update frequency of the Subscription.
onSubscription() → void
Event handler that is called by Lightstreamer to notify that a Subscription has been successfully subscribed to through the Server.
onSubscriptionError(int errorCode, String errorMessage) → void
Event handler that is called when the Server notifies an error on a Subscription. By implementing this method it is possible to perform recovery actions.
onUnsubscription() → void
Event handler that is called by Lightstreamer to notify that a Subscription has been successfully unsubscribed from.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited