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,
Function<String,URI> defaultUriMapper)
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,
Function<String,URI> defaultUriMapper)
Creates a new ConfigMappedNameResolverFactory with the given config that resolves the remapped target uri using
the given delegate.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultScheme() |
NameResolver |
newNameResolver(URI targetUri,
NameResolver.Helper helper)
Deprecated.
|
String |
toString() |
newNameResolver, newNameResolverpublic ConfigMappedNameResolverFactory(GrpcChannelsProperties config, Function<String,URI> defaultUriMapper)
config - The config used to remap the target uri.defaultUriMapper - The function to use when no uri is configured for a certain endpoint. This can be useful
if the address can be derived from the client name.public ConfigMappedNameResolverFactory(GrpcChannelsProperties config, NameResolver.Factory delegate, Function<String,URI> defaultUriMapper)
config - The config used to remap the target uri.delegate - The delegate used to resolve the remapped target uri.defaultUriMapper - The function to use when no uri is configured for a certain endpoint. This can be useful
if the address can be derived from the client name.@Nullable @Deprecated public NameResolver newNameResolver(URI targetUri, NameResolver.Helper helper)
newNameResolver in class NameResolver.Factorypublic String getDefaultScheme()
getDefaultScheme in class NameResolver.Factory