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 StringThe 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 booleannewNameResolver(URI targetUri, NameResolver.Args args) protected intpriority()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:
newNameResolverin classNameResolver.Factory
-
getDefaultScheme
- Specified by:
getDefaultSchemein classNameResolver.Factory
-
isAvailable
protected boolean isAvailable()- Specified by:
isAvailablein classNameResolverProvider
-
priority
protected int priority()- Specified by:
priorityin classNameResolverProvider
-
toString
-