carterkozak commented on a change in pull request #296:
URL: 
https://github.com/apache/httpcomponents-client/pull/296#discussion_r600904043



##########
File path: 
httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManager.java
##########
@@ -495,13 +513,58 @@ public void setDefaultSocketConfig(final SocketConfig 
defaultSocketConfig) {
         this.defaultSocketConfig = defaultSocketConfig;
     }
 
+    /**
+     * @since 5.2
+     */
+    public void setSocketConfig(final HttpRoute route, final SocketConfig 
socketConfig) {
+        socketConfigMap.put(route, defaultSocketConfig);
+    }
+
+    /**
+     * @since 5.2
+     */
+    public SocketConfig getSocketConfig(final HttpRoute route) {
+        return socketConfigMap.get(route);
+    }
+
+    /**
+     * @since 5.2
+     */
+    public ConnectionMgmtConfig getDefaultConnectionMgmtConfig() {
+        return defaultConnectionMgmtConfig;
+    }
+
+    /**
+     * @since 5.2
+     */
+    public void setDefaultConnectionMgmtConfig(final ConnectionMgmtConfig 
defaultConnectionMgmtConfig) {
+        this.defaultConnectionMgmtConfig = defaultConnectionMgmtConfig;
+    }
+
+    /**
+     * @since 5.2
+     */
+    public void setConnectionMgmtConfig(final HttpRoute route, final 
ConnectionMgmtConfig connectionMgmtConfig) {
+        connectionMgmtConfigMap.put(route, connectionMgmtConfig);
+    }
+
+    /**
+     * @since 5.2
+     */
+    public ConnectionMgmtConfig getConnectionMgmtConfig(final HttpRoute route) 
{
+        return connectionMgmtConfigMap.get(route);

Review comment:
       Should this return the default configuration when no route-specific 
configuration exists?
   `return connectionMgmtConfigMap.getOrDefault(route, 
defaultConnectionMgmtConfig);`
   
   It's not clear if this is intended to expose the configuration that we use 
for a given route, or provide access to route-specific overrides.
   
   I think the same argument can be made for the SocketConfig.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to