Last active
May 17, 2020 12:00
-
-
Save dhaval201279/ea77a1d7f6db9b42bec877d6462f8e5a to your computer and use it in GitHub Desktop.
HttpClient configuration for ConnectionPool using PoolingHttpClientConnectionManager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public PoolingHttpClientConnectionManager poolingConnectionManager() { | |
PoolingHttpClientConnectionManager poolingConnectionManager = | |
new PoolingHttpClientConnectionManager(getConnectionSocketFactoryRegistry()); | |
poolingConnectionManager.setMaxTotal(MAX_CONNECTIONS); | |
poolingConnectionManager.setDefaultMaxPerRoute(MAX_PER_ROUTE_CONNECTION); | |
poolingConnectionManager.setValidateAfterInactivity(VALIDATE_AFTER_INACTIVITY_IN_MILLIS); | |
return poolingConnectionManager; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment