@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1770") public abstract static class NameResolver.Factory extends Object
NameResolver
instances.Modifier and Type | Field and Description |
---|---|
static Attributes.Key<Integer> |
PARAMS_DEFAULT_PORT
Deprecated.
this will be deleted along with
newNameResolver(URI, Attributes) in
a future release. |
static Attributes.Key<ProxyDetector> |
PARAMS_PROXY_DETECTOR
Deprecated.
this will be deleted along with
newNameResolver(URI, Attributes) in
a future release |
Constructor and Description |
---|
Factory() |
Modifier and Type | Method and Description |
---|---|
abstract 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. |
NameResolver |
newNameResolver(URI targetUri,
Attributes params)
Deprecated.
Implement
newNameResolver(URI, NameResolver.Helper) instead. This is
going to be deleted in a future release. |
NameResolver |
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. |
NameResolver |
newNameResolver(URI targetUri,
NameResolver.Helper helper)
Deprecated.
implement
newNameResolver(URI, NameResolver.Args) instead |
@Deprecated public static final Attributes.Key<Integer> PARAMS_DEFAULT_PORT
newNameResolver(URI, Attributes)
in
a future release.@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/5113") @Deprecated public static final Attributes.Key<ProxyDetector> PARAMS_PROXY_DETECTOR
newNameResolver(URI, Attributes)
in
a future releaseProxyDetector
.
See documentation on ProxyDetector
about how proxies work in gRPC.@Nullable @Deprecated public NameResolver newNameResolver(URI targetUri, Attributes params)
newNameResolver(URI, NameResolver.Helper)
instead. This is
going to be deleted in a future release.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.targetUri
- the target URI to be resolved, whose scheme must not be null
params
- optional parameters. Canonical keys are defined as PARAMS_*
fields in
NameResolver.Factory
.@Deprecated @Nullable public NameResolver newNameResolver(URI targetUri, NameResolver.Helper helper)
newNameResolver(URI, NameResolver.Args)
insteadNameResolver
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.targetUri
- the target URI to be resolved, whose scheme must not be null
helper
- utility that may be used by the NameResolver implementationpublic NameResolver newNameResolver(URI targetUri, NameResolver.Args args)
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.targetUri
- the target URI to be resolved, whose scheme must not be null
args
- other information that may be usefulpublic abstract String getDefaultScheme()
ManagedChannelBuilder.forTarget(String)
is given an authority string instead of a compliant
URI.