Package io.grpc.netty
Class NettyServerProvider
java.lang.Object
io.grpc.ServerProvider
io.grpc.netty.NettyServerProvider
Provider for
NettyServerBuilder instances.-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.ServerProvider
ServerProvider.NewServerBuilderResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NettyServerBuilderbuilderForPort(int port) Creates a new builder with the given port.protected booleanWhether this provider is available for use, taking the current environment into consideration.protected ServerProvider.NewServerBuilderResultnewServerBuilderForPort(int port, ServerCredentials creds) Creates a new builder with the given port and credentials.protected intpriority()A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.Methods inherited from class io.grpc.ServerProvider
provider
-
Constructor Details
-
NettyServerProvider
public NettyServerProvider()
-
-
Method Details
-
isAvailable
protected boolean isAvailable()Description copied from class:ServerProviderWhether this provider is available for use, taking the current environment into consideration. Iffalse, no other methods are safe to be called.- Specified by:
isAvailablein classServerProvider
-
priority
protected int priority()Description copied from class:ServerProviderA priority, from 0 to 10 that this provider should be used, taking the current environment into consideration. 5 should be considered the default, and then tweaked based on environment detection. A priority of 0 does not imply that the provider wouldn't work; just that it should be last in line.- Specified by:
priorityin classServerProvider
-
builderForPort
Description copied from class:ServerProviderCreates a new builder with the given port.- Specified by:
builderForPortin classServerProvider
-
newServerBuilderForPort
protected ServerProvider.NewServerBuilderResult newServerBuilderForPort(int port, ServerCredentials creds) Description copied from class:ServerProviderCreates a new builder with the given port and credentials. Returns an error-string result if unable to understand the credentials.- Overrides:
newServerBuilderForPortin classServerProvider
-