setPassword method

void setPassword(
  1. String? newVal
)

Setter method that sets the password to be used for the authentication on Lightstreamer Server when initiating the session.

The Metadata Adapter is responsible for checking the credentials (username and password).

Default If no password is supplied, no password information will be sent at session initiation. The Metadata Adapter, however, may still allow the session.

Lifecycle The username should be set on the LightstreamerClient.connectionDetails object before calling the LightstreamerClient.connect method. However, the value can be changed at any time: the supplied value will be used for the next time a new session is requested to the server.
NOTE: The password string will be stored in the current instance. That is necessary in order to allow automatic reconnection/reauthentication for fail-over. For maximum security, avoid using an actual private password to authenticate on Lightstreamer Server; rather use a session-id originated by your web/application server, that can be checked by your Metadata Adapter.

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

  • newVal The password to be used for the authentication on Lightstreamer Server. The password can be null.

  • See setUser

Implementation

external void setPassword(String? newVal);