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.ConfigOrError
parseServiceConfig(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.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
-
-