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.

Hierarchy

  • CoreClient

Implements

Constructors

Properties

EVENT_CONNECT: string
EVENT_DISCONNECT: string
EVENT_RECONNECT: string
EVENT_RECONNECT_AUTH_FAILED: string
EVENT_REFRESH_TOKEN_UPDATED: string

Deprecated

EVENT_REQUEST_FAILED: string
EVENT_REQUEST_STARTED: string
EVENT_REQUEST_SUCCEEDED: string
FEATURES?: Features

A collection of feature flags that the JS API advertises. All must be nullable booleans, and if listed, the value is true.

Marked as nullable as past releases will not have this property, be sure to test for null if an older release might be in use.

LOGIN_TYPE_ANONYMOUS: string

Password login type.

When used as `credentials.type` for login, the credentials must include a username and a password.

LOGIN_TYPE_PASSWORD: string

Password login type.

When used as `credentials.type` for login, the credentials must include a username and a password.

Methods

  • Listen for events on this object.

    Type Parameters

    • T

      The type of the data that the event will provide.

    Parameters

    • name: string

      The name of the event to listen for.

    • callback: ((e) => void)

      A function to call when the event occurs.

        • (e): void
        • Parameters

          Returns void

    Returns (() => void)

    Returns a cleanup function.

      • (): void
      • Returns void

  • Disconnects and releases resources associated with this client.

    Returns void

  • Fetches authentication configuration values.

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

    Returns Promise<string[][]>

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

  • Fetches server configuration values for the current connection.

    Returns Promise<string[][]>

    a promise of configuration entries as an array of [key, value] string pairs

  • Returns the server URL associated with this client.

    Returns string

  • Logs in using the provided credentials.

    Parameters

    Returns Promise<void>

    a promise which resolves once the client has connected using the provided credentials

  • Type Parameters

    • T

    Parameters

    • eventName: string
    • Optional timeoutInMillis: number

    Returns Promise<Event<T>>

  • Resolves when the client is connected.

    Parameters

    • Optional timeoutInMillis: number

      ignored, only exists for legacy callers

    Returns Promise<void>

    a promise that resolves when connection is established, or rejects if connection fails

  • Logs in using a refresh token.

    Parameters

    Returns Promise<void>

    a promise which resolves once the client has connected using the updated credentials

  • Removes an event listener added to this table.

    Type Parameters

    • T

    Parameters

    • name: string
    • callback: ((e) => void)
        • (e): void
        • Parameters

          Returns void

    Returns boolean

  • Indicates whether this client instance is still usable.

    Returns Promise<CoreClient>

    a promise which resolves to this when the client is usable