LightstreamerClient class

Facade class for the management of the communication to Lightstreamer Server.

Used to provide configuration settings, event handlers, operations for the control of the connection lifecycle, Subscription handling and to send messages.
It also provides support for mobile push notifications (MPN) via MpnSubscription, a specific kind of subscription that routes real-time updates via push notifications.
An instance of LightstreamerClient handles the communication with Lightstreamer Server on a specified endpoint. Hence, it hosts one "Session"; or, more precisely, a sequence of Sessions, since any Session may fail and be recovered, or it can be interrupted on purpose. So, normally, a single instance of LightstreamerClient is needed.
However, multiple instances of LightstreamerClient can be used, toward the same or multiple endpoints.

You can listen to the events generated by a session by registering an event listener, such as ClientListener or SubscriptionListener. These listeners allow you to handle various events, such as session creation, connection status, subscription updates, and server messages. However, you should be aware that the event notifications are dispatched by a single thread, the so-called event thread. This means that if the operations of a listener are slow or blocking, they will delay the processing of the other listeners and affect the performance of your application. Therefore, you should delegate any slow or blocking operations to a dedicated thread, and keep the listener methods as fast and simple as possible. Note that even if you create multiple instances of LightstreamerClient, they will all use a single event thread, that is shared among them.

Available Extensions
Annotations

Constructors

LightstreamerClient(String serverAddress, String adapterSet)
Creates an object to be configured to connect to a Lightstreamer server and to handle all the communications with it.
factory

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

setLoggerProvider(LoggerProvider provider) → void
Static method that permits to configure the logging system used by the library.