Package io.grpc
Class NameResolverRegistry.NameResolverFactory
- java.lang.Object
-
- io.grpc.NameResolver.Factory
-
- io.grpc.NameResolverRegistry.NameResolverFactory
-
- Enclosing class:
- NameResolverRegistry
private final class NameResolverRegistry.NameResolverFactory extends NameResolver.Factory
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNameResolverFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultScheme()Returns the default scheme, which will be used to construct a URI whenManagedChannelBuilder.forTarget(String)is given an authority string instead of a compliant URI.NameResolvernewNameResolver(java.net.URI targetUri, NameResolver.Args args)Creates aNameResolverfor the given target URI, ornullif the given URI cannot be resolved by this factory.
-
-
-
Method Detail
-
newNameResolver
@Nullable public NameResolver newNameResolver(java.net.URI targetUri, NameResolver.Args args)
Description copied from class:NameResolver.FactoryCreates aNameResolverfor the given target URI, ornullif the given URI cannot be resolved by this factory. The decision should be solely based on the scheme of the URI.- Specified by:
newNameResolverin classNameResolver.Factory- Parameters:
targetUri- the target URI to be resolved, whose scheme must not benullargs- other information that may be useful
-
getDefaultScheme
public java.lang.String getDefaultScheme()
Description copied from class:NameResolver.FactoryReturns the default scheme, which will be used to construct a URI whenManagedChannelBuilder.forTarget(String)is given an authority string instead of a compliant URI.- Specified by:
getDefaultSchemein classNameResolver.Factory
-
-