/** * Submits the response processing on Grizzly client's application thread pool. * * @param responseTask task to be processed on application thread pool. */ private void processResponse(Runnable responseTask) { this.grizzlyClient.getConfig().executorService().submit(responseTask); }
/** * Submits the response processing on Grizzly client's application thread pool. * * @param responseTask task to be processed on application thread pool. */ private void processResponse(Runnable responseTask) { this.grizzlyClient.getConfig().executorService().submit(responseTask); }
handleResponseCode( uri, response.getStatusCode(), response.getStatusText() ); httpClient.getConfig().executorService().execute( new Runnable()
private void verifyDefaultUnderlyingClientConfig(AsyncHttpClientHelper instance) { AsyncHttpClientConfig config = instance.asyncHttpClient.getConfig(); assertThat(config.isAllowPoolingConnections()).isTrue(); assertThat(config.getMaxRequestRetry()).isEqualTo(0); assertThat(config.getRequestTimeout()).isEqualTo(DEFAULT_REQUEST_TIMEOUT_MILLIS); assertThat(config.getConnectionTTL()).isEqualTo(DEFAULT_POOLED_DOWNSTREAM_CONNECTION_TTL_MILLIS); assertThat(Whitebox.getInternalState(instance.asyncHttpClient, "signatureCalculator")).isNull(); }
handleResponseCode( uri, response.getStatusCode(), response.getStatusText() ); httpClient.getConfig().executorService().execute( new Runnable()
@DataProvider(value = { "true", "false" }, splitBy = "\\|") @Test public void kitchen_sink_constructor_sets_up_underlying_client_with_expected_config(boolean performSubspan) { // given int customRequestTimeoutVal = 4242; AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeout(customRequestTimeoutVal).build(); AsyncHttpClientConfig.Builder builderMock = mock(AsyncHttpClientConfig.Builder.class); doReturn(config).when(builderMock).build(); // when AsyncHttpClientHelper instance = new AsyncHttpClientHelper(builderMock, performSubspan); // then assertThat(instance.performSubSpanAroundDownstreamCalls).isEqualTo(performSubspan); assertThat(instance.asyncHttpClient.getConfig()).isSameAs(config); assertThat(instance.asyncHttpClient.getConfig().getRequestTimeout()).isEqualTo(customRequestTimeoutVal); }
activeHttpClient.getConfig().executorService().execute( new Runnable()
activeHttpClient.getConfig().executorService().execute( new Runnable()