Use a separate setter for shared connection manager flag
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1593923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b40661e45e
commit
0a93660d96
|
@ -334,25 +334,25 @@ public class HttpClientBuilder {
|
|||
*/
|
||||
public final HttpClientBuilder setConnectionManager(
|
||||
final HttpClientConnectionManager connManager) {
|
||||
return setConnectionManager(connManager, false);
|
||||
this.connManager = connManager;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns {@link HttpClientConnectionManager} instance.
|
||||
* Defines the connection manager is to be shared by multiple
|
||||
* client instances.
|
||||
* <p/>
|
||||
* If the connection manager is shared its life-cycle is expected
|
||||
* to be managed by the caller and it will not be shut down
|
||||
* if the client is closed.
|
||||
*
|
||||
* @param connManager connection manager
|
||||
* @param shared defines whether or not the connection manager can be shared
|
||||
* by multiple clients.
|
||||
*
|
||||
* @since 4.4
|
||||
*/
|
||||
public final HttpClientBuilder setConnectionManager(
|
||||
final HttpClientConnectionManager connManager, final boolean shared) {
|
||||
this.connManager = connManager;
|
||||
public final HttpClientBuilder setConnectionManagerShared(
|
||||
final boolean shared) {
|
||||
this.connManagerShared = shared;
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue