Search in sources :

Example 6 with OkHttpChannelBuilder

use of io.grpc.okhttp.OkHttpChannelBuilder in project grpc-java by grpc.

the class AndroidChannelBuilderTest method usingBuilderConstructor.

@Test
public void usingBuilderConstructor() {
    OkHttpChannelBuilder wrappedBuilder = OkHttpChannelBuilder.forTarget("target");
    AndroidChannelBuilder androidBuilder = AndroidChannelBuilder.usingBuilder(wrappedBuilder);
    assertThat(androidBuilder.delegate()).isSameInstanceAs(wrappedBuilder);
}
Also used : OkHttpChannelBuilder(io.grpc.okhttp.OkHttpChannelBuilder) Test(org.junit.Test)

Aggregations

OkHttpChannelBuilder (io.grpc.okhttp.OkHttpChannelBuilder)6 IOException (java.io.IOException)4 InetSocketAddress (java.net.InetSocketAddress)3 ConnectionSpec (com.squareup.okhttp.ConnectionSpec)2 ChannelCredentials (io.grpc.ChannelCredentials)2 TlsChannelCredentials (io.grpc.TlsChannelCredentials)2 InternalOkHttpChannelBuilder (io.grpc.okhttp.InternalOkHttpChannelBuilder)2 SSLPeerUnverifiedException (javax.net.ssl.SSLPeerUnverifiedException)2 InsecureChannelCredentials (io.grpc.InsecureChannelCredentials)1 SSLSocketFactory (javax.net.ssl.SSLSocketFactory)1 Test (org.junit.Test)1