Class OkHttpClientEngine

java.lang.Object
com.peterphi.std.guice.restclient.resteasy.impl.okhttp.OkHttpClientEngine
All Implemented Interfaces:
org.jboss.resteasy.client.jaxrs.ClientHttpEngine

public class OkHttpClientEngine extends Object implements org.jboss.resteasy.client.jaxrs.ClientHttpEngine
Implementation of ClientHttpEngine based on OkHttp.

Usage:


 new ResteasyClientBuilder()
     .httpEngine(new OkHttpClientEngine(okHttpClient))
     .build()
 
Author:
Thomas Broyer <t.broyer@ltgt.net>
  • Constructor Details

    • OkHttpClientEngine

      public OkHttpClientEngine(okhttp3.OkHttpClient client)
  • Method Details

    • getSslContext

      public SSLContext getSslContext()
      Specified by:
      getSslContext in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
    • setSslContext

      public void setSslContext(SSLContext sslContext)
    • getHostnameVerifier

      public HostnameVerifier getHostnameVerifier()
      Specified by:
      getHostnameVerifier in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
    • invoke

      public javax.ws.rs.core.Response invoke(javax.ws.rs.client.Invocation invocation)
      Specified by:
      invoke in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
    • close

      public void close()
      Specified by:
      close in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine