Class DndSessionFactoryFlight
java.lang.Object
io.deephaven.enterprise.dnd.client.DndSessionFactoryFlight
A factory class for creating
flight sessions
.-
Constructor Summary
ConstructorsConstructorDescriptionDndSessionFactoryFlight
(String serverUrl) Create a newDndSessionFactoryFlight
for fetchingFlightStream
s from a Persistent Query -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close all resources and connections with the server.createPersistentQueryConfig
(String name, float heapSizeGb, long autoDeleteTimeoutMillis) Create a new Interactive Console Persistent Query configuration with a language set to `Python`void
Use a delegate token to authenticate; automatically calling the defaultAuthenticationClientManager
.void
delegateToken
(AuthToken delegateToken) Use a delegate token to authenticate.protected void
getPQ
(long serial) Get aPersistentQueryInfoMessage
for the specified PQ serial.Get aPersistentQueryInfoMessage
for the specified PQ name.protected DndSessionFlight
makeSession
(PersistentQueryInfoMessage qConfig, AuthToken authToken, boolean deleteOnClose, DeephavenClusterConnection connection) newWorker
(PersistentQueryConfigMessage message, long startupTimeoutMillis) Create a new Interactive Console Persistent Query session.void
Authenticate with the server using a username and passwordpersistentQuery
(long serial) Create a newDndSession
to the specified Persistent Query by serial.persistentQuery
(String name) Create a newDndSession
to the specified Persistent Query by name.void
privateKey
(String keyFile) Authenticate to the server using a private key file.void
setMaxInboundMessageSize
(int maxInboundMessageSize)
-
Constructor Details
-
DndSessionFactoryFlight
Create a newDndSessionFactoryFlight
for fetchingFlightStream
s 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(PersistentQueryInfoMessage qConfig, AuthToken authToken, boolean deleteOnClose, DeephavenClusterConnection connection) throws IOException - Throws:
IOException
-
password
Authenticate with the server using a username and password- Parameters:
user
- the usernamepassword
- the password
-
privateKey
Authenticate to the server using a private key file.- Parameters:
keyFile
- the private key file
-
delegateToken
Use a delegate token to authenticate. -
delegateToken
public void delegateToken()Use a delegate token to authenticate; automatically calling the defaultAuthenticationClientManager
.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 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 withheapSizeGb
- the desired heap size in GBautoDeleteTimeoutMillis
- how long the query should remain if all clients disconnect- Returns:
- a new
PersistentQueryConfigMessage.Builder
to use withnewWorker(PersistentQueryConfigMessage, long)
-
newWorker
public DndSessionFlight newWorker(@NotNull String name, float heapSizeGb, long autoDeleteTimeoutMillis, long startupTimeoutMillis) throws IOException - Throws:
IOException
-
newWorker
public DndSessionFlight newWorker(@NotNull PersistentQueryConfigMessage message, long startupTimeoutMillis) throws IOException Create a new Interactive Console Persistent Query session.- Parameters:
message
- thePersistentQueryInfoMessage
to create the Persistent Query withstartupTimeoutMillis
- 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
Create a newDndSession
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
Create a newDndSession
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() -
getPQ
Get aPersistentQueryInfoMessage
for the specified PQ serial.- Parameters:
serial
- the PQ's serial- Returns:
- the
PersistentQueryInfoMessage
, or null if the PQ doesn't exist
-
getPQ
Get aPersistentQueryInfoMessage
for the specified PQ name.- Parameters:
name
- the PQ's name- Returns:
- the
PersistentQueryInfoMessage
, or null if the PQ doesn't exist
-