Class CoreClient


@JsType(namespace="dh") public class CoreClient extends HasEventHandling
A client for connecting to a Deephaven server from the Deephaven JS API.

This type manages connection lifecycle and authentication state, and provides helpers to fetch server and authentication-related configuration.

  • Field Details

  • Constructor Details

  • Method Details

    • running

      public elemental2.promise.Promise<CoreClient> running()
      Indicates whether this client instance is still usable.
      Returns:
      a promise which resolves to this when the client is usable
    • getServerUrl

      public String getServerUrl()
      Returns the server URL associated with this client.
    • getAuthConfigValues

      public elemental2.promise.Promise<String[][]> getAuthConfigValues()
      Fetches authentication configuration values.

      This method is intended to be used before a session is established.

      Returns:
      a promise of key/value pairs, returned as a two-element string array per entry
    • login

      public elemental2.promise.Promise<Void> login(@TsTypeRef(LoginCredentials.class) @TsTypeRef(LoginCredentials.class) jsinterop.base.JsPropertyMap<Object> credentials)
      Logs in using the provided credentials.
      Parameters:
      credentials - the login credentials
      Returns:
      a promise which resolves once the client has connected using the provided credentials
    • relogin

      public elemental2.promise.Promise<Void> relogin(@TsTypeRef(JsRefreshToken.class) @TsTypeRef(JsRefreshToken.class) Object token)
      Logs in using a refresh token.
      Parameters:
      token - the refresh token
      Returns:
      a promise which resolves once the client has connected using the updated credentials
    • onConnected

      public elemental2.promise.Promise<Void> onConnected(@JsOptional @JsNullable Double timeoutInMillis)
      Resolves when the client is connected.
      Parameters:
      timeoutInMillis - ignored, only exists for legacy callers
      Returns:
      a promise that resolves when connection is established, or rejects if connection fails
    • getServerConfigValues

      public elemental2.promise.Promise<String[][]> getServerConfigValues()
      Fetches server configuration values for the current connection.
      Returns:
      a promise of configuration entries as an array of [key, value] string pairs
    • getStorageService

      public JsStorageService getStorageService()
      Returns a storage service associated with this client's connection.
    • getAsIdeConnection

      public elemental2.promise.Promise<IdeConnection> getAsIdeConnection()
      Returns a promise that resolves to the underlying IdeConnection.
    • disconnect

      public void disconnect()
      Disconnects and releases resources associated with this client.