public class CouchbaseLiteHttpClientFactory extends java.lang.Object implements HttpClientFactory
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT_SECONDS |
static int |
DEFAULT_READ_TIMEOUT |
static int |
DEFAULT_SO_TIMEOUT_SECONDS |
static int |
DEFAULT_WRITE_TIMEOUT |
| Constructor and Description |
|---|
CouchbaseLiteHttpClientFactory(ClearableCookieJar cookieJar)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCookies(java.util.List<Cookie> cookies) |
void |
allowSelfSignedSSLCertificates()
This is a convenience method to allow couchbase lite to connect to servers
that use self-signed SSL certs.
|
void |
deleteCookie(java.lang.String name) |
void |
deleteCookie(java.net.URL url) |
void |
evictAllConnectionsInPool() |
CookieJar |
getCookieStore() |
OkHttpClient |
getOkHttpClient() |
boolean |
isFollowRedirects()
This method is for unit tests only.
|
void |
resetCookieStore() |
void |
setFollowRedirects(boolean followRedirects)
This method is for unit tests only.
|
void |
setHostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) |
void |
setSSLSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory) |
public static int DEFAULT_SO_TIMEOUT_SECONDS
public static int DEFAULT_CONNECTION_TIMEOUT_SECONDS
public static int DEFAULT_READ_TIMEOUT
public static int DEFAULT_WRITE_TIMEOUT
public CouchbaseLiteHttpClientFactory(ClearableCookieJar cookieJar)
public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory)
sslSocketFactory - This is to open up the system for end user to inject
the sslSocket factories with their custom KeyStorepublic void setHostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)
public void evictAllConnectionsInPool()
evictAllConnectionsInPool in interface HttpClientFactorypublic OkHttpClient getOkHttpClient()
getOkHttpClient in interface HttpClientFactorypublic void addCookies(java.util.List<Cookie> cookies)
addCookies in interface HttpClientFactorypublic void deleteCookie(java.lang.String name)
deleteCookie in interface HttpClientFactorypublic void deleteCookie(java.net.URL url)
deleteCookie in interface HttpClientFactorypublic void resetCookieStore()
resetCookieStore in interface HttpClientFactorypublic CookieJar getCookieStore()
getCookieStore in interface HttpClientFactorypublic void allowSelfSignedSSLCertificates()
public boolean isFollowRedirects()
public void setFollowRedirects(boolean followRedirects)