@Internal public final class UdsNameResolverProvider extends NameResolverProvider
Constructor and Description |
---|
UdsNameResolverProvider() |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultScheme()
Returns the default scheme, which will be used to construct a URI when
ManagedChannelBuilder.forTarget(String) is given an authority string instead of a compliant
URI. |
protected Collection<Class<? extends SocketAddress>> |
getProducedSocketAddressTypes()
Returns the
SocketAddress types this provider's name-resolver is capable of producing. |
protected boolean |
isAvailable()
Whether this provider is available for use, taking the current environment into consideration.
|
io.grpc.netty.UdsNameResolver |
newNameResolver(URI targetUri,
NameResolver.Args args)
Creates a
NameResolver for the given target URI, or null if the given URI
cannot be resolved by this factory. |
protected int |
priority()
A priority, from 0 to 10 that this provider should be used, taking the current environment into
consideration.
|
getScheme
public io.grpc.netty.UdsNameResolver newNameResolver(URI targetUri, NameResolver.Args args)
NameResolver.Factory
NameResolver
for the given target URI, or null
if the given URI
cannot be resolved by this factory. The decision should be solely based on the scheme of the
URI.newNameResolver
in class NameResolver.Factory
targetUri
- the target URI to be resolved, whose scheme must not be null
args
- other information that may be usefulpublic String getDefaultScheme()
NameResolver.Factory
ManagedChannelBuilder.forTarget(String)
is given an authority string instead of a compliant
URI.getDefaultScheme
in class NameResolver.Factory
protected boolean isAvailable()
NameResolverProvider
false
, no other methods are safe to be called.isAvailable
in class NameResolverProvider
protected int priority()
NameResolverProvider
priority
in class NameResolverProvider
protected Collection<Class<? extends SocketAddress>> getProducedSocketAddressTypes()
NameResolverProvider
SocketAddress
types this provider's name-resolver is capable of producing.
This enables selection of the appropriate ManagedChannelProvider
for a channel.getProducedSocketAddressTypes
in class NameResolverProvider
SocketAddress
types this provider's name-resolver is capable of producing.