Package io.deephaven.dhservice.client
Class EnvoyDiscoverySupportServiceGrpcImpl
java.lang.Object
io.deephaven.dhservice.client.EnvoyDiscoverySupportServiceGrpcImpl
- All Implemented Interfaces:
AuthenticatedService,EnvoyDiscoverySupportService
public class EnvoyDiscoverySupportServiceGrpcImpl
extends Object
implements EnvoyDiscoverySupportService
Implementation of the ServiceRegistry API which sends requests over grpc to a remote server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.dhservice.client.AuthenticatedService
AuthenticatedService.DefaultImpl -
Method Summary
Modifier and TypeMethodDescriptionbooleanAttempt default authentication if this is not already authenticated.booleanauthenticate(@NotNull String keyFile) Authenticate, or re-authenticate using the given private key file.booleanauthenticate(@NotNull String user, @NotNull String password) Authenticate, or re-authenticate using the given credentials.booleanauthenticate(@NotNull String user, @NotNull String password, @Nullable String operateAsUser) Authenticate, or re-authenticate using the given credentials.static EnvoyDiscoverySupportServicemake()Create an instance with the default config.static EnvoyDiscoverySupportServicemake(@NotNull ClientConnectionConfig configs) Create an instance with the given config.booleansetTokenFactoryFactory(@Nullable TokenFactoryFactory tokenAuthenticationManager) Set the authentication client manager to use for token generation.voidsetWorkerSnapshot(@NotNull String serviceId, @NotNull Collection<? extends WorkerStreamProvider.WorkerInfo> workersSnapshot) Notify the system that the collection of workers has changed for the given serviceId.
-
Method Details
-
make
Create an instance with the given config.- Parameters:
configs- use thisClientConnectionConfig- Returns:
- a new instance
-
make
public static EnvoyDiscoverySupportService make() throws IOException, ClientConnectionConfigProvider.ProviderExceptionCreate an instance with the default config.- Returns:
- a new instance
- Throws:
IOException- if an IO exception occurs while loading the client connection configurationClientConnectionConfigProvider.ProviderException- if a parsing exception occurs while processing the client connection configuration
-
setWorkerSnapshot
public void setWorkerSnapshot(@NotNull @NotNull String serviceId, @NotNull @NotNull Collection<? extends WorkerStreamProvider.WorkerInfo> workersSnapshot) Description copied from interface:EnvoyDiscoverySupportServiceNotify the system that the collection of workers has changed for the given serviceId.- Specified by:
setWorkerSnapshotin interfaceEnvoyDiscoverySupportService- Parameters:
serviceId- an identifier for this collection of workersworkersSnapshot- the current complete collection of workers for the serviceId
-
authenticate
public boolean authenticate()Description copied from interface:AuthenticatedServiceAttempt default authentication if this is not already authenticated.- Specified by:
authenticatein interfaceAuthenticatedService- Returns:
- true if authentication succeeded, else false
-
authenticate
Description copied from interface:AuthenticatedServiceAuthenticate, or re-authenticate using the given private key file.- Specified by:
authenticatein interfaceAuthenticatedService- Returns:
- true if authentication succeeded, else false
-
authenticate
public boolean authenticate(@NotNull @NotNull String user, @NotNull @NotNull String password, @Nullable @Nullable String operateAsUser) Description copied from interface:AuthenticatedServiceAuthenticate, or re-authenticate using the given credentials.- Specified by:
authenticatein interfaceAuthenticatedService- Parameters:
user- user to authenticatepassword- password for authenticationoperateAsUser- optional operate-as user- Returns:
- true if authentication succeeded, else false
-
authenticate
Description copied from interface:AuthenticatedServiceAuthenticate, or re-authenticate using the given credentials.- Specified by:
authenticatein interfaceAuthenticatedService- Parameters:
user- user to authenticatepassword- password for authentication- Returns:
- true if authentication succeeded, else false
-
setTokenFactoryFactory
public boolean setTokenFactoryFactory(@Nullable @Nullable TokenFactoryFactory tokenAuthenticationManager) Description copied from interface:AuthenticatedServiceSet the authentication client manager to use for token generation. If tokenAuthenticationManager is null or is not already authenticated, this call will de-authenticate the connection.- Specified by:
setTokenFactoryFactoryin interfaceAuthenticatedService- Parameters:
tokenAuthenticationManager- the authentication client manager to be used for future calls.- Returns:
- true if authentication succeeded, else false
-
getAuthenticatedUser
- Specified by:
getAuthenticatedUserin interfaceAuthenticatedService
-