Class NameResolverRegistry.NameResolverFactory
java.lang.Object
io.grpc.NameResolver.Factory
io.grpc.NameResolverRegistry.NameResolverFactory
- Enclosing class:
NameResolverRegistry
- Since:
- 1.21.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default scheme, which will be used to construct a URI whenManagedChannelBuilder.forTarget(String)is given an authority string instead of a compliant URI.newNameResolver(URI targetUri, NameResolver.Args args) Creates aNameResolverfor the given target URI, ornullif the given URI cannot be resolved by this factory.
-
Constructor Details
-
NameResolverFactory
private NameResolverFactory()
-
-
Method Details
-
newNameResolver
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
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
-