public final class OkHttpChannelBuilder extends io.grpc.AbstractChannelBuilder<OkHttpChannelBuilder>
| Modifier and Type | Method and Description |
|---|---|
protected io.grpc.AbstractChannelBuilder.ChannelEssentials |
buildEssentials() |
static OkHttpChannelBuilder |
forAddress(String host,
int port)
Creates a new builder for the given server host and port.
|
OkHttpChannelBuilder |
overrideHostForAuthority(String host)
Overrides the host used with TLS and HTTP virtual hosting.
|
OkHttpChannelBuilder |
setConnectionSpec(ConnectionSpec connectionSpec)
For secure connection, provides a ConnectionSpec to specify Cipher suite and
TLS versions.
|
OkHttpChannelBuilder |
sslSocketFactory(SSLSocketFactory factory)
Provides a SSLSocketFactory to establish a secure connection.
|
OkHttpChannelBuilder |
transportExecutor(ExecutorService executor)
Override the default executor necessary for internal transport use.
|
public static OkHttpChannelBuilder forAddress(String host, int port)
public OkHttpChannelBuilder transportExecutor(ExecutorService executor)
The channel does not take ownership of the given executor. It is the caller' responsibility to shutdown the executor when appropriate.
public OkHttpChannelBuilder overrideHostForAuthority(String host)
Should only used by tests.
public OkHttpChannelBuilder sslSocketFactory(SSLSocketFactory factory)
public OkHttpChannelBuilder setConnectionSpec(ConnectionSpec connectionSpec)
By default OkHttpClientTransport.DEFAULT_CONNECTION_SPEC will be used.
protected io.grpc.AbstractChannelBuilder.ChannelEssentials buildEssentials()
buildEssentials in class io.grpc.AbstractChannelBuilder<OkHttpChannelBuilder>