Package io.deephaven.dhservice.client
Class UnifiedServiceGrpcImpl
java.lang.Object
io.deephaven.dhservice.client.AuthenticatedService.DefaultImpl
io.deephaven.dhservice.client.UnifiedServiceGrpcImpl
- All Implemented Interfaces:
AuthenticatedService,UnifiedService,AutoCloseable
public final class UnifiedServiceGrpcImpl
extends AuthenticatedService.DefaultImpl
implements UnifiedService, AutoCloseable
Represents the single grpc server hosting multiple services served by the Configuration Server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.dhservice.client.AuthenticatedService
AuthenticatedService.DefaultImpl -
Method Summary
Modifier and TypeMethodDescriptionabout()Return information about this service.booleanAttempt default authentication if this is not already authenticated.voidclose()protected voidfinalize()Return an implementation of the ConfigurationService interface that provides data via a network connection to a service provider.Return an implementation of the DataRoutingService interface that provides data via a network connection to a service provider.protected @NotNull com.fishlib.io.logger.LoggergetLog()Get a Logger from the implementation (which probably has one)Return an implementation of the ProcessRegistry interface that provides data via a network connection to a service provider.Return an implementation of the SchemaService interface that provides data via a network connection to a service provider.Return an implementation of the ServiceRegistry interface that provides data via a network connection to a service provider.protected @Nullable TokenFactoryFactoryGet the current TokenFactoryFactory from the implementation, for use in the authenticate method implementationsReturn an implementation of the WritableDataRoutingService interface that provides data via a network connection to a service provider.static UnifiedServicemake()Create an instance with default configs.static UnifiedServicemake(ClientConnectionConfig configs) Create an instance with the given configs.booleansetTokenFactoryFactory(TokenFactoryFactory newTokenAuthenticationManager) Send a token from the new authentication client manager to the server for validation.Methods inherited from class io.deephaven.dhservice.client.AuthenticatedService.DefaultImpl
authenticate, authenticate, getAuthenticatedUserMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.dhservice.client.AuthenticatedService
authenticate, authenticate, authenticate, getAuthenticatedUser
-
Method Details
-
make
Create an instance with the given configs.- Parameters:
configs- use thisClientConnectionConfig- Returns:
- a new instance
- Throws:
SSLException- if there is an SSL related problem connecting to the server
-
make
public static UnifiedService make() throws IOException, ClientConnectionConfigProvider.ProviderExceptionCreate an instance with default configs.- 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
-
getSchemaService
Description copied from interface:UnifiedServiceReturn an implementation of the SchemaService interface that provides data via a network connection to a service provider.- Specified by:
getSchemaServicein interfaceUnifiedService- Returns:
- a SchemaService
-
getDataRoutingService
Description copied from interface:UnifiedServiceReturn an implementation of the DataRoutingService interface that provides data via a network connection to a service provider.- Specified by:
getDataRoutingServicein interfaceUnifiedService- Returns:
- a DataRoutingService
-
getWritableDataRoutingService
Description copied from interface:UnifiedServiceReturn an implementation of the WritableDataRoutingService interface that provides data via a network connection to a service provider.- Specified by:
getWritableDataRoutingServicein interfaceUnifiedService- Returns:
- a WritableDataRoutingService
-
getConfigurationService
Description copied from interface:UnifiedServiceReturn an implementation of the ConfigurationService interface that provides data via a network connection to a service provider.- Specified by:
getConfigurationServicein interfaceUnifiedService- Returns:
- a ConfigurationService
-
getServiceRegistry
Description copied from interface:UnifiedServiceReturn an implementation of the ServiceRegistry interface that provides data via a network connection to a service provider.- Specified by:
getServiceRegistryin interfaceUnifiedService- Returns:
- a ServiceRegistry
-
getProcessRegistry
Description copied from interface:UnifiedServiceReturn an implementation of the ProcessRegistry interface that provides data via a network connection to a service provider.- Specified by:
getProcessRegistryin interfaceUnifiedService- Returns:
- a RegistryLookup
-
about
Description copied from interface:UnifiedServiceReturn information about this service.- Specified by:
aboutin interfaceUnifiedService- Returns:
- an information string.
-
authenticate
public boolean authenticate()Description copied from interface:AuthenticatedServiceAttempt default authentication if this is not already authenticated.- Specified by:
authenticatein interfaceAuthenticatedService- Overrides:
authenticatein classAuthenticatedService.DefaultImpl- Returns:
- true if authentication succeeded, else false
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceUnifiedService
-
finalize
protected void finalize() -
getLog
@NotNull protected @NotNull com.fishlib.io.logger.Logger getLog()Description copied from class:AuthenticatedService.DefaultImplGet a Logger from the implementation (which probably has one)- Specified by:
getLogin classAuthenticatedService.DefaultImpl- Returns:
- a Logger
-
getTokenFactoryFactory
Description copied from class:AuthenticatedService.DefaultImplGet the current TokenFactoryFactory from the implementation, for use in the authenticate method implementations- Specified by:
getTokenFactoryFactoryin classAuthenticatedService.DefaultImpl- Returns:
- the current auth client manager, may be null
-
setTokenFactoryFactory
Send a token from the new authentication client manager to the server for validation. Set tokenAuthenticationManager if it succeeds, or set it to null if it fails (which makes the connection unauthenticated). If newTokenAuthenticationManager is null, no token is sent to the server and return false.- Specified by:
setTokenFactoryFactoryin interfaceAuthenticatedService- Parameters:
newTokenAuthenticationManager- a new authentication client manager, may be null- Returns:
- true if we successfully authenticated with the server
-