test_class.file: utils/src/test/java/com/cloud/utils/rest/HttpClientHelperTest.java
test_class.identifier: HttpClientHelperTest
test_case.body: @Test
      public void testCreateClient() throws Exception {
          int maxRedirects = 5;
          final CloseableHttpClient client = HttpClientHelper.createHttpClient(maxRedirects);
  
          assertThat(client, notNullValue());
      }
test_case.class_method_signature: HttpClientHelperTest.testCreateClient()
test_case.full_signature: @Test public void testCreateClient()
test_case.identifier: testCreateClient
test_case.invocations: createHttpClient assertThat notNullValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateClient()
focal_class.declarator: s_logger = LoggerFactory.getLogger(HttpClientHelper.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger s_logger = LoggerFactory.getLogger(HttpClientHelper.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: MAX_ALLOCATED_CONNECTIONS = 50
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_ALLOCATED_CONNECTIONS = 50;
focal_class.type: int
focal_class.var_name: MAX_ALLOCATED_CONNECTIONS
focal_class.declarator: MAX_ALLOCATED_CONNECTIONS_PER_ROUTE = 25
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_ALLOCATED_CONNECTIONS_PER_ROUTE = 25;
focal_class.type: int
focal_class.var_name: MAX_ALLOCATED_CONNECTIONS_PER_ROUTE
focal_class.declarator: DEFAULT_SOCKET_TIMEOUT = 3000
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_SOCKET_TIMEOUT = 3000;
focal_class.type: int
focal_class.var_name: DEFAULT_SOCKET_TIMEOUT
focal_class.declarator: DEFAULT_CONNECTION_REQUEST_TIMEOUT = 3000
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_CONNECTION_REQUEST_TIMEOUT = 3000;
focal_class.type: int
focal_class.var_name: DEFAULT_CONNECTION_REQUEST_TIMEOUT
focal_class.declarator: DEFAULT_CONNECT_TIMEOUT = 3000
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_CONNECT_TIMEOUT = 3000;
focal_class.type: int
focal_class.var_name: DEFAULT_CONNECT_TIMEOUT
focal_class.declarator: HTTPS = HttpConstants.HTTPS
focal_class.modifier: private static final
focal_class.original_string: private static final String HTTPS = HttpConstants.HTTPS;
focal_class.type: String
focal_class.var_name: HTTPS
focal_class.file: utils/src/main/java/com/cloud/utils/rest/HttpClientHelper.java
focal_class.identifier: HttpClientHelper
focal_class.class_method_signature: HttpClientHelper.createHttpClient(final int maxRedirects)
focal_class.full_signature: public static CloseableHttpClient createHttpClient(final int maxRedirects)
focal_class.identifier: createHttpClient
focal_class.modifiers: public static
focal_class.parameters: (final int maxRedirects)
focal_class.return: CloseableHttpClient
focal_class.signature: CloseableHttpClient createHttpClient(final int maxRedirects)
focal_class.class_method_signature: HttpClientHelper.createSocketFactoryConfigration()
focal_class.full_signature: private static Registry<ConnectionSocketFactory> createSocketFactoryConfigration()
focal_class.identifier: createSocketFactoryConfigration
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: Registry<ConnectionSocketFactory>
focal_class.signature: Registry<ConnectionSocketFactory> createSocketFactoryConfigration()
focal_method.body: public static CloseableHttpClient createHttpClient(final int maxRedirects) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException {
          s_logger.info("Creating new HTTP connection pool and client");
          final Registry<ConnectionSocketFactory> socketFactoryRegistry = createSocketFactoryConfigration();
          final BasicCookieStore cookieStore = new BasicCookieStore();
          final PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
          connManager.setDefaultMaxPerRoute(MAX_ALLOCATED_CONNECTIONS_PER_ROUTE);
          connManager.setMaxTotal(MAX_ALLOCATED_CONNECTIONS);
          final RequestConfig requestConfig = RequestConfig.custom()
              .setCookieSpec(CookieSpecs.DEFAULT)
              .setMaxRedirects(maxRedirects)
              .setSocketTimeout(DEFAULT_SOCKET_TIMEOUT)
              .setConnectionRequestTimeout(DEFAULT_CONNECTION_REQUEST_TIMEOUT)
              .setConnectTimeout(DEFAULT_CONNECT_TIMEOUT)
              .build();
          return HttpClientBuilder.create()
              .setConnectionManager(connManager)
              .setRedirectStrategy(new LaxRedirectStrategy())
              .setDefaultRequestConfig(requestConfig)
              .setDefaultCookieStore(cookieStore)
              .setRetryHandler(new StandardHttpRequestRetryHandler())
              .build();
      }
focal_method.class_method_signature: HttpClientHelper.createHttpClient(final int maxRedirects)
focal_method.full_signature: public static CloseableHttpClient createHttpClient(final int maxRedirects)
focal_method.identifier: createHttpClient
focal_method.invocations: info createSocketFactoryConfigration setDefaultMaxPerRoute setMaxTotal build setConnectTimeout setConnectionRequestTimeout setSocketTimeout setMaxRedirects setCookieSpec custom build setRetryHandler setDefaultCookieStore setDefaultRequestConfig setRedirectStrategy setConnectionManager create
focal_method.modifiers: public static
focal_method.parameters: (final int maxRedirects)
focal_method.return: CloseableHttpClient
focal_method.signature: CloseableHttpClient createHttpClient(final int maxRedirects)