public class StaticNameResolverProvider
extends io.grpc.NameResolverProvider
NameResolver
with static addresses. This factory uses the
"static" scheme
.Modifier and Type | Field and Description |
---|---|
static java.net.URI |
STATIC_DEFAULT_URI
The default URI to use if target address is configured.
|
static java.util.function.Function<java.lang.String,java.net.URI> |
STATIC_DEFAULT_URI_MAPPER
The function that should be used as default uri mapper, if no name based default can be computed.
|
static java.lang.String |
STATIC_SCHEME
The constant containing the scheme that will be used by this factory.
|
Constructor and Description |
---|
StaticNameResolverProvider() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultScheme() |
protected boolean |
isAvailable() |
io.grpc.NameResolver |
newNameResolver(java.net.URI targetUri,
io.grpc.Attributes params) |
protected int |
priority() |
java.lang.String |
toString() |
public static final java.lang.String STATIC_SCHEME
public static final java.net.URI STATIC_DEFAULT_URI
public static final java.util.function.Function<java.lang.String,java.net.URI> STATIC_DEFAULT_URI_MAPPER
@Nullable public io.grpc.NameResolver newNameResolver(java.net.URI targetUri, io.grpc.Attributes params)
newNameResolver
in class io.grpc.NameResolver.Factory
public java.lang.String getDefaultScheme()
getDefaultScheme
in class io.grpc.NameResolver.Factory
protected boolean isAvailable()
isAvailable
in class io.grpc.NameResolverProvider
protected int priority()
priority
in class io.grpc.NameResolverProvider
public java.lang.String toString()
toString
in class java.lang.Object