LightstreamerClient constructor

LightstreamerClient(
  1. String? serverAddress,
  2. String? adapterSet
)

Creates an object to be configured to connect to a Lightstreamer server and to handle all the communications with it.

Each LightstreamerClient is the entry point to connect to a Lightstreamer server, subscribe to as many items as needed and to send messages.

  • serverAddress the address of the Lightstreamer Server to which this LightstreamerClient will connect to. It is possible to specify it later by using null here. See ConnectionDetails.setServerAddress for details.
  • adapterSet the name of the Adapter Set mounted on Lightstreamer Server to be used to handle all requests in the Session associated with this LightstreamerClient. It is possible not to specify it at all or to specify it later by using null here. See ConnectionDetails.setAdapterSet for details.

Throws IllegalArgumentException if a not valid address is passed. See ConnectionDetails.setServerAddress for details.

Implementation

LightstreamerClient(String? serverAddress, String? adapterSet) : _id = '${_idGenerator++}' {
  connectionDetails = ConnectionDetails._(_id);
  connectionOptions = ConnectionOptions._(_id);
  connectionDetails._serverAddress = serverAddress;
  connectionDetails._adapterSet = adapterSet;
  NativeBridge.instance.client_create(_id, this);
}