public abstract static class NameResolver.Helper extends Object
NameResolver.Factory.newNameResolver(URI, NameResolver.Helper).| Modifier and Type | Class and Description |
|---|---|
static class |
NameResolver.Helper.ConfigOrError
Represents either a successfully parsed service config, containing all necessary parts to be
later applied by the channel, or a Status containing the error encountered while parsing.
|
| Constructor and Description |
|---|
Helper() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getDefaultPort()
The port number used in case the target or the underlying naming system doesn't provide a
port number.
|
abstract ProxyDetector |
getProxyDetector()
If the NameResolver wants to support proxy, it should inquire this
ProxyDetector. |
SynchronizationContext |
getSynchronizationContext()
Returns the
SynchronizationContext where NameResolver.start(io.grpc.NameResolver.Listener), NameResolver.shutdown() and NameResolver.refresh() are run from. |
NameResolver.Helper.ConfigOrError |
parseServiceConfig(Map<String,?> rawServiceConfig)
Parses and validates the service configuration chosen by the name resolver.
|
public abstract int getDefaultPort()
public abstract ProxyDetector getProxyDetector()
ProxyDetector.
See documentation on ProxyDetector about how proxies work in gRPC.public SynchronizationContext getSynchronizationContext()
SynchronizationContext where NameResolver.start(io.grpc.NameResolver.Listener), NameResolver.shutdown() and NameResolver.refresh() are run from.public NameResolver.Helper.ConfigOrError parseServiceConfig(Map<String,?> rawServiceConfig)
NameResolver.Helper.ConfigOrError which contains either the successfully parsed config, or the
Status representing the failure to parse. Implementations are expected to not throw
exceptions but return a Status representing the failure.rawServiceConfig - The Map representation of the service config