Class OkHttpClientFactory

  • 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.
    • Method Detail

      • create

        public okhttp3.OkHttpClient create​(boolean apiHostInsecure)
      • getDefaultClient

        public okhttp3.OkHttpClient getDefaultClient()
        default secure OkHttpClient with shared resource pool.
      • getDefaultUnsecureClient

        public okhttp3.OkHttpClient getDefaultUnsecureClient()
        default OkHttpClient with shared resource pool that will accept all SSL certificates by default.
      • getDefaultClientBuilder

        public okhttp3.OkHttpClient.Builder getDefaultClientBuilder()
        default OkHttpClient.Builder with shared resource pool.
      • getDefaultUnsecureClientBuilder

        public okhttp3.OkHttpClient.Builder getDefaultUnsecureClientBuilder()
        default OkHttpClient.Builder with shared resource pool that is preconfigured to accept all SSL certificates.