Added method to create minimal HttpClient with a custom connection manager

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1426535 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2012-12-28 14:59:41 +00:00
parent d695c0e8b6
commit 712cafd1e9
1 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,7 @@
package org.apache.http.impl.client; package org.apache.http.impl.client;
import org.apache.http.annotation.Immutable; import org.apache.http.annotation.Immutable;
import org.apache.http.conn.HttpClientConnectionManager;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
/** /**
@ -56,4 +57,8 @@ public class HttpClients {
return new MinimalHttpClient(new PoolingHttpClientConnectionManager()); return new MinimalHttpClient(new PoolingHttpClientConnectionManager());
} }
public static CloseableHttpClient createMinimal(final HttpClientConnectionManager connManager) {
return new MinimalHttpClient(connManager);
}
} }