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