roded commented on a change in pull request #64: JCLOUDS-1520 - Reuse 
SSLSocketFactory in JavaUrlHttpCommandExecutorSe…
URL: https://github.com/apache/jclouds/pull/64#discussion_r393551321
 
 

 ##########
 File path: 
core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java
 ##########
 @@ -72,6 +74,7 @@
    protected Supplier<SSLContext> sslContextSupplier;
    protected final int outputSocketBufferSize;
    protected final String userAgent;
+   protected final AtomicReference<SSLSocketFactory> sslSocketFactoryReference;
 
 Review comment:
   Yeah that is intended - similarly to the way `HttpsURLConnection` uses the 
same instance of the default `SSLSocketFactory` (provided by 
`SSLSocketFactory.getDefault()`) in the case in which its `SSLSocketFactory` 
has not been explicitly set. Using the same `SSLSocketFactory` instance will 
allow `HttpsClient` to reuse existing connections from its `KeepAliveCache`.
   
   I think that the better solution would be to inject 
`Supplier<SSLSocketFactory>`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to