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 NettyServerBuilder
builderForPort
(int port) Creates a new builder with the given port.protected boolean
Whether this provider is available for use, taking the current environment into consideration.protected ServerProvider.NewServerBuilderResult
newServerBuilderForPort
(int port, ServerCredentials creds) Creates a new builder with the given port and credentials.protected int
priority()
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:ServerProvider
Whether this provider is available for use, taking the current environment into consideration. Iffalse
, no other methods are safe to be called.- Specified by:
isAvailable
in classServerProvider
-
priority
protected int priority()Description copied from class:ServerProvider
A 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:
priority
in classServerProvider
-
builderForPort
Description copied from class:ServerProvider
Creates a new builder with the given port.- Specified by:
builderForPort
in classServerProvider
-
newServerBuilderForPort
protected ServerProvider.NewServerBuilderResult newServerBuilderForPort(int port, ServerCredentials creds) Description copied from class:ServerProvider
Creates a new builder with the given port and credentials. Returns an error-string result if unable to understand the credentials.- Overrides:
newServerBuilderForPort
in classServerProvider
-