Package io.grpc

Class NameResolverRegistry

  • @ExperimentalApi("")
    public final class NameResolverRegistry
    extends java.lang.Object
    Registry of NameResolverProviders. The default instance loads providers at runtime through the Java service provider mechanism.
    • Constructor Detail

      • NameResolverRegistry

        public NameResolverRegistry()
    • Method Detail

      • getDefaultScheme

        public java.lang.String getDefaultScheme()
      • getProviderForScheme

        public NameResolverProvider getProviderForScheme​(java.lang.String scheme)
      • register

        public void register​(NameResolverProvider provider)
        Register a provider.

        If the provider's isAvailable() returns false, this method will throw IllegalArgumentException.

        Providers will be used in priority order. In case of ties, providers are used in registration order.

      • getDefaultRegistry

        public static NameResolverRegistry getDefaultRegistry()
        Returns the default registry that loads providers via the Java service loader mechanism.