Class DefaultOkHttpClientConnectionPoolFactory

java.lang.Object
org.springframework.cloud.commons.httpclient.DefaultOkHttpClientConnectionPoolFactory
All Implemented Interfaces:
OkHttpClientConnectionPoolFactory

public class DefaultOkHttpClientConnectionPoolFactory extends Object implements OkHttpClientConnectionPoolFactory
Default implementation of OkHttpClientConnectionPoolFactory.
Author:
Ryan Baxter
  • Constructor Details

    • DefaultOkHttpClientConnectionPoolFactory

      public DefaultOkHttpClientConnectionPoolFactory()
  • Method Details

    • create

      public okhttp3.ConnectionPool create(int maxIdleConnections, long keepAliveDuration, TimeUnit timeUnit)
      Description copied from interface: OkHttpClientConnectionPoolFactory
      Creates a new ConnectionPool.
      Specified by:
      create in interface OkHttpClientConnectionPoolFactory
      Parameters:
      maxIdleConnections - Number of max idle connections to allow.
      keepAliveDuration - Amount of time to keep connections alive.
      timeUnit - The time unit for the keep-alive duration.
      Returns:
      A new ConnectionPool.