Config { public int getMaxConnections() { return maxTotal; } Config(); @Deprecated // use httpClient(Function<Config, Client> httpClient) with the ApacheConfig.builder() Config httpClient(HttpClient httpClient); Config httpClient(Client httpClient); Config httpClient(Function<Config, Client> httpClient); @Deprecated Config asyncClient(HttpAsyncClient value); Config asyncClient(AsyncClient value); Config asyncClient(Function<Config, AsyncClient> asyncClientBuilder); Config proxy(Proxy value); Config proxy(String host, int port); Config proxy(String host, int port, String username, String password); Config setObjectMapper(ObjectMapper om); Config sslContext(SSLContext ssl); Config hostnameVerifier(HostnameVerifier value); Config clientCertificateStore(KeyStore store, String password); Config clientCertificateStore(String fileLocation, String password); Config connectTimeout(int inMillies); Config socketTimeout(int inMillies); Config concurrency(int total, int perRoute); Config clearDefaultHeaders(); Config setDefaultBasicAuth(String username, String password); Config setDefaultHeader(String name, String value); Config setDefaultHeader(String name, Supplier<String> value); Config addDefaultHeader(String name, String value); Config instrumentWith(UniMetric metric); @Deprecated Config errorHandler(Consumer<HttpResponse<?>> consumer); Config interceptor(Interceptor value); @Deprecated Config addInterceptor(HttpRequestInterceptor value); Config followRedirects(boolean enable); Config enableCookieManagement(boolean enable); Config verifySsl(boolean value); Config useSystemProperties(boolean value); Config requestCompression(boolean value); Config automaticRetries(boolean value); Config cookieSpec(String policy); void cacheResponses(boolean value); void cacheResponses(Cache.Builder value); Config setDefaultResponseEncoding(String value); Config connectionTTL(long duration, TimeUnit unit); Config connectionTTL(Duration duration); Config addShutdownHook(boolean value); Config defaultBaseUrl(String value); Headers getDefaultHeaders(); boolean isRunning(); Config reset(); void shutDown(boolean clearOptions); Client getClient(); AsyncClient getAsyncClient(); boolean getEnabledCookieManagement(); boolean getFollowRedirects(); int getMaxConnections(); int getMaxPerRoutes(); int getConnectionTimeout(); int getSocketTimeout(); KeyStore getKeystore(); String getKeyStorePassword(); ObjectMapper getObjectMapper(); List<HttpRequestInterceptor> getInterceptor(); Proxy getProxy(); boolean useSystemProperties(); String getDefaultResponseEncoding(); boolean isRequestCompressionOn(); boolean isAutomaticRetries(); boolean isVerifySsl(); boolean shouldAddShutdownHook(); String getCookieSpec(); UniMetric getMetric(); long getTTL(); Interceptor getUniInterceptor(); @Deprecated Consumer<HttpResponse<?>> getErrorHandler(); SSLContext getSslContext(); HostnameVerifier getHostnameVerifier(); static final int DEFAULT_CONNECTION_TIMEOUT; static final int DEFAULT_MAX_CONNECTIONS; static final int DEFAULT_MAX_PER_ROUTE; static final int DEFAULT_CONNECT_TIMEOUT; static final int DEFAULT_SOCKET_TIMEOUT; }
@Test public void shouldKeepMaxTotalDefault(){ assertEquals(Config.DEFAULT_MAX_CONNECTIONS, config.getMaxConnections()); }