Class DndSessionFactoryFlight

java.lang.Object
io.deephaven.enterprise.dnd.client.DndSessionFactoryFlight

public class DndSessionFactoryFlight extends Object
A factory class for creating flight sessions.
  • Constructor Details

    • DndSessionFactoryFlight

      public DndSessionFactoryFlight(@NotNull String serverUrl) throws IOException
      Create a new DndSessionFactoryFlight for fetching FlightStreams from a Persistent Query
      Parameters:
      serverUrl - the url to the server
      Throws:
      IOException - if there was a problem connecting to the server
  • Method Details

    • makeSession

      protected DndSessionFlight makeSession(io.deephaven.proto.controller.PersistentQueryInfoMessage qConfig, String trustStore, io.deephaven.enterprise.auth.AuthToken authToken, ScheduledExecutorService executor, boolean deleteOnClose, ControllerClientGrpc controllerClientGrpc, int maxInboundMessageSize) throws IOException
      Throws:
      IOException
    • password

      public void password(@NotNull String user, @NotNull String password)
      Authenticate with the server using a username and password
      Parameters:
      user - the username
      password - the password
    • privateKey

      public void privateKey(@NotNull String keyFile)
      Authenticate to the server using a private key file.
      Parameters:
      keyFile - the private key file
    • delegateToken

      public void delegateToken(@NotNull io.deephaven.enterprise.auth.AuthToken delegateToken)
      Use a delegate token to authenticate.
    • delegateToken

      public void delegateToken()
      Use a delegate token to authenticate; automatically calling the default AuthenticationClientManager.

      This is suitable for use within a single Deephaven cluster, when one authenticated worker should connect as the same user to another worker.

    • close

      @OverridingMethodsMustInvokeSuper public void close()
      Close all resources and connections with the server.
    • createPersistentQueryConfig

      public io.deephaven.proto.controller.PersistentQueryConfigMessage.Builder createPersistentQueryConfig(@NotNull String name, float heapSizeGb, long autoDeleteTimeoutMillis)
      Create a new Interactive Console Persistent Query configuration with a language set to `Python`
      Parameters:
      name - the name to create with
      heapSizeGb - the desired heap size in GB
      autoDeleteTimeoutMillis - how long the query should remain if all clients disconnect
      Returns:
      a new PersistentQueryConfigMessage.Builder to use with newWorker(PersistentQueryConfigMessage, long)
    • newWorker

      public DndSessionFlight newWorker(@NotNull String name, float heapSizeGb, long autoDeleteTimeoutMillis, long startupTimeoutMillis) throws IOException
      Throws:
      IOException
    • newWorker

      public DndSessionFlight newWorker(@NotNull io.deephaven.proto.controller.PersistentQueryConfigMessage message, long startupTimeoutMillis) throws IOException
      Create a new Interactive Console Persistent Query session.
      Parameters:
      message - the PersistentQueryInfoMessage to create the Persistent Query with
      startupTimeoutMillis - the timeout for starting the query
      Returns:
      a new DndSessionFactoryBase for communicating with the Persistent Query.
      Throws:
      IOException - if there was a problem creating the Persistent Query
    • persistentQuery

      public DndSessionFlight persistentQuery(@NotNull String name) throws IOException
      Create a new DndSession to the specified Persistent Query by name.
      Parameters:
      name - the name of the Persistent Query
      Returns:
      a new DndSession for communicating with the Persistent Query.
      Throws:
      IOException - if there was a problem creating the Persistent Query
    • persistentQuery

      public DndSessionFlight persistentQuery(long serial) throws IOException
      Create a new DndSession to the specified Persistent Query by serial.
      Parameters:
      serial - the name of the Persistent Query
      Returns:
      a new DndSession for communicating with the Persistent Query.
      Throws:
      IOException - if there was a problem creating the Persistent Query
    • setMaxInboundMessageSize

      public void setMaxInboundMessageSize(int maxInboundMessageSize)
    • doOnAuthenticated

      protected void doOnAuthenticated()