Package io.grpc
Class NameResolver.ServiceConfigParser
java.lang.Object
io.grpc.NameResolver.ServiceConfigParser
- Direct Known Subclasses:
ScParser
- 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 -
Method Summary
Modifier and TypeMethodDescriptionabstract NameResolver.ConfigOrError
parseServiceConfig
(Map<String, ?> rawServiceConfig) Parses and validates the service configuration chosen by the name resolver.
-
Constructor Details
-
ServiceConfigParser
public ServiceConfigParser()
-
-
Method Details
-
parseServiceConfig
Parses and validates the service configuration chosen by the name resolver. This will return aNameResolver.ConfigOrError
which contains either the successfully parsed config, or theStatus
representing the failure to parse. Implementations are expected to not throw exceptions but return a Status representing the failure. The value inside theNameResolver.ConfigOrError
should implementequals()
andhashCode()
.- Parameters:
rawServiceConfig
- TheMap
representation of the service config- Returns:
- a tuple of the fully parsed and validated channel configuration, else the Status.
- Since:
- 1.21.0
-