Skip to content

Commit

Permalink
Provide config service methods to java clients (#3532)
Browse files Browse the repository at this point in the history
Refactors existing java-client gRPC response observers into one shared
implementation, so that all can be canceled.

Fixes #3528
  • Loading branch information
niloc132 authored and jcferretti committed Mar 16, 2023
1 parent 9848395 commit 266558a
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 323 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.deephaven.client.impl;

import io.deephaven.proto.backplane.grpc.ConfigValue;

import java.util.Map;
import java.util.concurrent.CompletableFuture;

/**
* Provides server-specified configuration values to gRPC clients.
*/
public interface ConfigService {
/**
* Returns constants from the server that may be helpful to correctly authenticate with the server. As such,
* authentication is not required to obtain these values.
*/
CompletableFuture<Map<String, ConfigValue>> getAuthenticationConstants();

/**
* Returns constants from the server that are specified as being appropriate for clients to read. By default these
* include values like the suggested authentication token refresh interval, and the server-side version of
* deephaven, barrage, and java.
*/
CompletableFuture<Map<String, ConfigValue>> getConfigurationConstants();
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
* A session represents a client-side connection to a Deephaven server.
*/
public interface Session
extends AutoCloseable, ApplicationService, ConsoleService, InputTableService, ObjectService, TableService {
extends AutoCloseable, ApplicationService, ConsoleService, InputTableService, ObjectService, TableService,
ConfigService {

// ----------------------------------------------------------

Expand Down
Loading

0 comments on commit 266558a

Please sign in to comment.