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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
javax.ws.rs.core.Response
invoke
(javax.ws.rs.client.Invocation invocation) void
setSslContext
(SSLContext sslContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
isFollowRedirects, setFollowRedirects
-
Constructor Details
-
OkHttpClientEngine
public OkHttpClientEngine(okhttp3.OkHttpClient client)
-
-
Method Details
-
getSslContext
- Specified by:
getSslContext
in interfaceorg.jboss.resteasy.client.jaxrs.ClientHttpEngine
-
setSslContext
-
getHostnameVerifier
- Specified by:
getHostnameVerifier
in interfaceorg.jboss.resteasy.client.jaxrs.ClientHttpEngine
-
invoke
public javax.ws.rs.core.Response invoke(javax.ws.rs.client.Invocation invocation) - Specified by:
invoke
in interfaceorg.jboss.resteasy.client.jaxrs.ClientHttpEngine
-
close
public void close()- Specified by:
close
in interfaceorg.jboss.resteasy.client.jaxrs.ClientHttpEngine
-