Package io.grpc
Class NameResolverRegistry.NameResolverFactory
java.lang.Object
io.grpc.NameResolver.Factory
io.grpc.NameResolverRegistry.NameResolverFactory
- Enclosing class:
NameResolverRegistry
-
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 aNameResolver
for the given target URI, ornull
if the given URI cannot be resolved by this factory.
-
Constructor Details
-
NameResolverFactory
private NameResolverFactory()
-
-
Method Details
-
newNameResolver
Description copied from class:NameResolver.Factory
Creates aNameResolver
for the given target URI, ornull
if the given URI cannot be resolved by this factory. The decision should be solely based on the scheme of the URI.- Specified by:
newNameResolver
in classNameResolver.Factory
- Parameters:
targetUri
- the target URI to be resolved, whose scheme must not benull
args
- other information that may be useful
-
getDefaultScheme
Description copied from class:NameResolver.Factory
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.- Specified by:
getDefaultScheme
in classNameResolver.Factory
-