| Package | Description |
|---|---|
| io.grpc.okhttp |
A lightweight transport based on
OkHttp, mainly for use on Android
(client-only).
|
| Modifier and Type | Method and Description |
|---|---|
OkHttpChannelBuilder |
OkHttpChannelProvider.builderForAddress(String name,
int port) |
OkHttpChannelBuilder |
OkHttpChannelProvider.builderForTarget(String target) |
OkHttpChannelBuilder |
OkHttpChannelBuilder.connectionSpec(ConnectionSpec connectionSpec)
For secure connection, provides a ConnectionSpec to specify Cipher suite and
TLS versions.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.enableKeepAlive(boolean enable)
Deprecated.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.enableKeepAlive(boolean enable,
long keepAliveTime,
TimeUnit delayUnit,
long keepAliveTimeout,
TimeUnit timeoutUnit)
Deprecated.
|
static OkHttpChannelBuilder |
OkHttpChannelBuilder.forAddress(String host,
int port)
Creates a new builder for the given server host and port.
|
static OkHttpChannelBuilder |
OkHttpChannelBuilder.forTarget(String target)
Creates a new builder for the given target that will be resolved by
NameResolver. |
OkHttpChannelBuilder |
OkHttpChannelBuilder.hostnameVerifier(HostnameVerifier hostnameVerifier)
Set the hostname verifier to use when using TLS negotiation.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.keepAliveTime(long keepAliveTime,
TimeUnit timeUnit)
Sets the time without read activity before sending a keepalive ping.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.keepAliveTimeout(long keepAliveTimeout,
TimeUnit timeUnit)
Sets the time waiting for read activity after sending a keepalive ping.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.keepAliveWithoutCalls(boolean enable)
Sets whether keepalive will be performed when there are no outstanding RPC on a connection.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.negotiationType(NegotiationType type)
Sets the negotiation type for the HTTP/2 connection.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.sslSocketFactory(SSLSocketFactory factory)
Override the default
SSLSocketFactory and enable NegotiationType.TLS
negotiation. |
OkHttpChannelBuilder |
OkHttpChannelBuilder.transportExecutor(Executor transportExecutor)
Override the default executor necessary for internal transport use.
|
OkHttpChannelBuilder |
OkHttpChannelBuilder.usePlaintext(boolean skipNegotiation)
Equivalent to using
negotiationType(NegotiationType) with PLAINTEXT. |