Class SelfNameResolverFactory
java.lang.Object
io.grpc.NameResolver.Factory
io.grpc.NameResolverProvider
net.devh.boot.grpc.server.nameresolver.SelfNameResolverFactory
A name resolver factory that will create a
SelfNameResolverFactory
based on the target uri.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The constant containing the scheme that will be used by this factory. -
Constructor Summary
ConstructorsConstructorDescriptionSelfNameResolverFactory
(GrpcServerProperties properties) Creates a new SelfNameResolverFactory that uses the given properties. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
newNameResolver
(URI targetUri, NameResolver.Args args) protected int
priority()
toString()
Methods inherited from class io.grpc.NameResolverProvider
getProducedSocketAddressTypes, getScheme
-
Field Details
-
SELF_SCHEME
The constant containing the scheme that will be used by this factory.- See Also:
-
-
Constructor Details
-
SelfNameResolverFactory
Creates a new SelfNameResolverFactory that uses the given properties.- Parameters:
properties
- The properties used to resolve this server's address.
-
-
Method Details
-
newNameResolver
- Specified by:
newNameResolver
in classNameResolver.Factory
-
getDefaultScheme
- Specified by:
getDefaultScheme
in classNameResolver.Factory
-
isAvailable
protected boolean isAvailable()- Specified by:
isAvailable
in classNameResolverProvider
-
priority
protected int priority()- Specified by:
priority
in classNameResolverProvider
-
toString
-