Package io.grpc
Class NameResolver.ServiceConfigParser
- java.lang.Object
-
- io.grpc.NameResolver.ServiceConfigParser
-
- Enclosing class:
- NameResolver
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") public abstract static class NameResolver.ServiceConfigParser extends Object
Parses and validates service configuration.- Since:
- 1.21.0
-
-
Constructor Summary
Constructors Constructor Description ServiceConfigParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract NameResolver.ConfigOrErrorparseServiceConfig(Map<String,?> rawServiceConfig)Parses and validates the service configuration chosen by the name resolver.
-
-
-
Method Detail
-
parseServiceConfig
public abstract NameResolver.ConfigOrError parseServiceConfig(Map<String,?> rawServiceConfig)
Parses and validates the service configuration chosen by the name resolver. This will return aNameResolver.ConfigOrErrorwhich contains either the successfully parsed config, or theStatusrepresenting the failure to parse. Implementations are expected to not throw exceptions but return a Status representing the failure. The value inside theNameResolver.ConfigOrErrorshould implementequals()andhashCode().- Parameters:
rawServiceConfig- TheMaprepresentation of the service config- Returns:
- a tuple of the fully parsed and validated channel configuration, else the Status.
- Since:
- 1.21.0
-
-