public final class OkHttpClientFactory
extends java.lang.Object
OkHttpClient instance factory that builds and configures client instances sharing
the common resource pool: this is the recommended approach to optimize resource usage.| Modifier and Type | Field and Description |
|---|---|
static OkHttpClientFactory |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
okhttp3.OkHttpClient |
create(boolean apiHostInsecure) |
okhttp3.OkHttpClient |
getDefaultClient() |
okhttp3.OkHttpClient.Builder |
getDefaultClientBuilder() |
okhttp3.OkHttpClient |
getDefaultUnsecureClient() |
okhttp3.OkHttpClient.Builder |
getDefaultUnsecureClientBuilder() |
public static final OkHttpClientFactory INSTANCE
public okhttp3.OkHttpClient create(boolean apiHostInsecure)
public okhttp3.OkHttpClient getDefaultClient()
OkHttpClient with shared resource pool.public okhttp3.OkHttpClient getDefaultUnsecureClient()
OkHttpClient with shared resource pool
that will accept all SSL certificates by default.public okhttp3.OkHttpClient.Builder getDefaultClientBuilder()
OkHttpClient.Builder with shared resource pool.public okhttp3.OkHttpClient.Builder getDefaultUnsecureClientBuilder()
OkHttpClient.Builder with shared resource pool
that is preconfigured to accept all SSL certificates.