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 Summary
-
Method Summary
-
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 newConnectionPool
.- Specified by:
create
in interfaceOkHttpClientConnectionPoolFactory
- 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
.
-