Class DeephavenClusterConnection
java.lang.Object
io.deephaven.enterprise.dnd.client.DeephavenClusterConnection
An object that maintains connections to Deephaven services on a remote cluster. This is used by the Java Client to
 create and subscribe to queries, and also used by Core+ workers to connect to queries on different clusters.
- 
Constructor SummaryConstructorsConstructorDescriptionDeephavenClusterConnection(@NotNull String connectionUrl) Create a new, unauthenticated connection to the specified Deephaven cluster.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Close all connections to the remote host.booleandelegateToken(@NotNull AuthToken delegateToken) Use a delegate token to authenticate.Get theAuthenticationClientfor the cluster.Get thecontroller clientfor the cluster.Get theScheduledExecutorServiceused for connections created by this object.Get the authenticatedUserContextfor this object.io.grpc.ManagedChannelmakeGrpcChannel(@NotNull String host, int port, @Nullable Map<String, String> extraHeaders) Construct a gRPC channel for communication with the Persistent QuerybooleanAuthenticate with the server using a username and passwordbooleanprivateKey(@NotNull String keyFile) Authenticate to the server using a private key file.voidsetMaxInboundMessageSize(int maxInboundMessageSize) Set the maximum inbound message size for connections created by this object.
- 
Constructor Details- 
DeephavenClusterConnectionCreate a new, unauthenticated connection to the specified Deephaven cluster. Users should call one ofpassword(String, String),privateKey(String)ordelegateToken(AuthToken)to authenticate with the server before accessing the provided services.- Parameters:
- connectionUrl- the url of the remote system in the format `https://server-address:port/iris/connection.json`
- Throws:
- IOException- if there is a problem establishing a connection to the remote cluster.
 
 
- 
- 
Method Details- 
closepublic void close()Close all connections to the remote host.
- 
passwordAuthenticate with the server using a username and password- Parameters:
- user- the username
- password- the password
- Returns:
- true if successfully authenticated, false otherwise.
 
- 
privateKeyAuthenticate to the server using a private key file.- Parameters:
- keyFile- the private key file
- Returns:
- true if successfully authenticated, false otherwise.
 
- 
delegateTokenUse a delegate token to authenticate.- Parameters:
- delegateToken- the token to authenticate with
- Returns:
- true if successfully authenticated, false otherwise.
 
- 
setMaxInboundMessageSizepublic void setMaxInboundMessageSize(int maxInboundMessageSize) Set the maximum inbound message size for connections created by this object.- Parameters:
- maxInboundMessageSize- the new max inbound message size
 
- 
getControllerClientGet thecontroller clientfor the cluster. The controller client will automatically be authenticated when any of the authentication methods have completed successfully.- Returns:
- the ControllerClientGrpc
 
- 
getAuthenticationClientGet theAuthenticationClientfor the cluster.- Returns:
- the authentication client
 
- 
getExecutorGet theScheduledExecutorServiceused for connections created by this object.- Returns:
- the ScheduledExecutorService
 
- 
getUserContextGet the authenticatedUserContextfor this object.- Returns:
- the authenticated UserContext
- Throws:
- NotAuthenticatedException- if this connection has not been authenticated
 
- 
makeGrpcChannelpublic io.grpc.ManagedChannel makeGrpcChannel(@NotNull @NotNull String host, int port, @Nullable @Nullable Map<String, String> extraHeaders) throws IOExceptionConstruct a gRPC channel for communication with the Persistent Query- Parameters:
- host- the host of the query
- port- the port of the query
- extraHeaders- a map of any extra HTTP headers to include, or null if none.
- Returns:
- a new ManagedChannelfor communication with the Persistent Query
- Throws:
- IOException- if there was a problem creating the channel
 
 
-