getServerInstanceAddress method

String? getServerInstanceAddress()

Inquiry method that gets the server address to be used to issue all requests related to the current session.

In fact, when a Server cluster is in place, the Server address specified through setServerAddress can identify various Server instances; in order to ensure that all requests related to a session are issued to the same Server instance, the Server can answer to the session opening request by providing an address which uniquely identifies its own instance. When this is the case, this address is returned by the method; otherwise, null is returned.
Note that the addresses will always have the http: or https: scheme. In case WebSockets are used, the specified scheme is internally converted to match the related WebSocket protocol (i.e. http becomes ws while https becomes wss).

General Edition Note Server Clustering is an optional feature, available depending on Edition and License Type. To know what features are enabled by your license, please see the License tab of the Monitoring Dashboard (by default, available at /dashboard).

Lifecycle If a session is not currently active, null is returned; soon after a session is established, the value may become available.

Notification A change to this setting will be notified through a call to ClientListener.onPropertyChange with argument "serverInstanceAddress" on any ClientListener listening to the related LightstreamerClient.

Returns address used to issue all requests related to the current session, or null.

Implementation

String? getServerInstanceAddress() {
  return _serverInstanceAddress;
}