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 private
NameResolverFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultScheme()
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.NameResolver
newNameResolver(java.net.URI targetUri, NameResolver.Args args)
Creates aNameResolver
for the given target URI, ornull
if 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.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
public java.lang.String 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
-
-