@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4159") public abstract class NameResolverProvider extends NameResolver.Factory
Implementations should not throw. If they do, it may interrupt class loading. If
exceptions may reasonably occur for implementation-specific reasons, implementations should
generally handle the exception gracefully and return false
from isAvailable()
.
Modifier and Type | Field | Description |
---|---|---|
static Attributes.Key<java.lang.Integer> |
PARAMS_DEFAULT_PORT |
Deprecated.
|
PARAMS_PROXY_DETECTOR
Constructor | Description |
---|---|
NameResolverProvider() |
Modifier and Type | Method | Description |
---|---|---|
static NameResolver.Factory |
asFactory() |
Deprecated.
Use NameResolverRegistry.getDefaultRegistry().asFactory()
|
protected abstract boolean |
isAvailable() |
Whether this provider is available for use, taking the current environment into consideration.
|
protected abstract int |
priority() |
A priority, from 0 to 10 that this provider should be used, taking the current environment into
consideration.
|
static java.util.List<NameResolverProvider> |
providers() |
Deprecated.
Has no replacement
|
getDefaultScheme, newNameResolver, newNameResolver, newNameResolver
@Deprecated public static final Attributes.Key<java.lang.Integer> PARAMS_DEFAULT_PORT
@Deprecated public static java.util.List<NameResolverProvider> providers()
null
ClassLoader-wide providers, in preference order.@Deprecated public static NameResolver.Factory asFactory()
protected abstract boolean isAvailable()
false
, no other methods are safe to be called.protected abstract int priority()