Package io.grpc.netty
Class NettyServerProvider
- java.lang.Object
-
- io.grpc.ServerProvider
-
- io.grpc.netty.NettyServerProvider
-
@Internal public final class NettyServerProvider extends ServerProvider
Provider forNettyServerBuilder
instances.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.grpc.ServerProvider
ServerProvider.NewServerBuilderResult
-
-
Constructor Summary
Constructors Constructor Description NettyServerProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NettyServerBuilder
builderForPort(int port)
Creates a new builder with the given port.protected boolean
isAvailable()
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
-
-
-
-
Method Detail
-
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
protected NettyServerBuilder builderForPort(int port)
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
-
-