Package | Description |
---|---|
io.grpc |
The gRPC core public API.
|
io.grpc.netty |
The main transport implementation based on Netty,
for both the client and the server.
|
io.grpc.okhttp |
A lightweight transport based on
OkHttp, mainly for use on Android
(client-only).
|
io.grpc.xds |
Library for gPRC proxyless service mesh using Envoy xDS protocol.
|
Modifier and Type | Class and Description |
---|---|
class |
ChoiceServerCredentials
Provides a list of
ServerCredentials , where any one may be used. |
class |
InsecureServerCredentials
No server identity or encryption is to be used.
|
class |
TlsServerCredentials
TLS credentials, providing server identity and encryption.
|
Modifier and Type | Method and Description |
---|---|
ServerCredentials |
TlsServerCredentials.Builder.build()
Construct the credentials.
|
static ServerCredentials |
InsecureServerCredentials.create() |
static ServerCredentials |
TlsServerCredentials.create(File certChain,
File privateKey)
Creates an instance using provided certificate chain and private key.
|
static ServerCredentials |
TlsServerCredentials.create(InputStream certChain,
InputStream privateKey)
Creates an instance using provided certificate chain and private key.
|
static ServerCredentials |
ChoiceServerCredentials.create(ServerCredentials... creds)
Constructs with the provided
creds as options, with preferred credentials first. |
Modifier and Type | Method and Description |
---|---|
List<ServerCredentials> |
ChoiceServerCredentials.getCredentialsList()
Non-empty list of credentials, in preference order.
|
Modifier and Type | Method and Description |
---|---|
static ServerCredentials |
ChoiceServerCredentials.create(ServerCredentials... creds)
Constructs with the provided
creds as options, with preferred credentials first. |
protected ServerProvider.NewServerBuilderResult |
ServerProvider.newServerBuilderForPort(int port,
ServerCredentials creds)
Creates a new builder with the given port and credentials.
|
static ServerBuilder<?> |
Grpc.newServerBuilderForPort(int port,
ServerCredentials creds)
Static factory for creating a new ServerBuilder.
|
Modifier and Type | Method and Description |
---|---|
static ServerCredentials |
NettySslContextServerCredentials.create(io.netty.handler.ssl.SslContext sslContext)
Create a credential using Netty's SslContext as configuration.
|
Modifier and Type | Method and Description |
---|---|
static NettyServerBuilder |
NettyServerBuilder.forAddress(SocketAddress address,
ServerCredentials creds)
Creates a server builder configured with the given
SocketAddress . |
static NettyServerBuilder |
NettyServerBuilder.forPort(int port,
ServerCredentials creds)
Creates a server builder that will bind to the given port.
|
protected ServerProvider.NewServerBuilderResult |
NettyServerProvider.newServerBuilderForPort(int port,
ServerCredentials creds) |
Modifier and Type | Method and Description |
---|---|
static ServerCredentials |
SslSocketFactoryServerCredentials.create(SSLSocketFactory factory) |
static ServerCredentials |
SslSocketFactoryServerCredentials.create(SSLSocketFactory factory,
com.squareup.okhttp.ConnectionSpec connectionSpec) |
Modifier and Type | Method and Description |
---|---|
static OkHttpServerBuilder |
OkHttpServerBuilder.forPort(int port,
ServerCredentials creds)
Creates a builder for a server listening on
port . |
static OkHttpServerBuilder |
OkHttpServerBuilder.forPort(SocketAddress address,
ServerCredentials creds)
Creates a builder for a server listening on
address . |
Modifier and Type | Method and Description |
---|---|
static ServerCredentials |
XdsServerCredentials.create(ServerCredentials fallback)
Creates credentials to be configured by xDS, falling back to other credentials if no
TLS configuration is provided by xDS.
|
Modifier and Type | Method and Description |
---|---|
static ServerCredentials |
XdsServerCredentials.create(ServerCredentials fallback)
Creates credentials to be configured by xDS, falling back to other credentials if no
TLS configuration is provided by xDS.
|
static XdsServerBuilder |
XdsServerBuilder.forPort(int port,
ServerCredentials serverCredentials)
Creates a gRPC server builder for the given port.
|