public class ConfigMappedNameResolverFactory extends NameResolver.Factory
NameResolver factory that uses the the properties to rewrite the target uri.PARAMS_DEFAULT_PORT, PARAMS_PROXY_DETECTOR| Constructor and Description |
|---|
ConfigMappedNameResolverFactory(GrpcChannelsProperties config)
Creates a new ConfigMappedNameResolverFactory with the given config that resolves the remapped target uri using
the grpc's registered name resolvers.
|
ConfigMappedNameResolverFactory(GrpcChannelsProperties config,
NameResolver.Factory delegate)
Creates a new ConfigMappedNameResolverFactory with the given config that resolves the remapped target uri using
the given delegate.
|
ConfigMappedNameResolverFactory(GrpcChannelsProperties config,
NameResolverRegistry registry)
Creates a new ConfigMappedNameResolverFactory with the given config that resolves the remapped target uri using
the grpc's registered name resolvers.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultScheme() |
NameResolver |
newNameResolver(URI targetUri,
NameResolver.Args args) |
String |
toString() |
newNameResolver, newNameResolverpublic ConfigMappedNameResolverFactory(GrpcChannelsProperties config)
config - The config used to remap the target uri.public ConfigMappedNameResolverFactory(GrpcChannelsProperties config, NameResolverRegistry registry)
config - The config used to remap the target uri.registry - The registry to use as NameResolver.Factory delegate.public ConfigMappedNameResolverFactory(GrpcChannelsProperties config, NameResolver.Factory delegate)
config - The config used to remap the target uri.delegate - The delegate used to resolve the remapped target uri.@Nullable public NameResolver newNameResolver(URI targetUri, NameResolver.Args args)
newNameResolver in class NameResolver.Factorypublic String getDefaultScheme()
getDefaultScheme in class NameResolver.Factory