/** * Return the name of {@link AsyncHttpClient}, or default string if name is null or empty. * * @return the name. */ public String getNameOrDefault() { String r = name; if (r == null || r.isEmpty()) { r = defaultName(); } if (r == null || r.isEmpty()) { r = "AsyncHttpClient"; } return r; }
void configureDefaults() { maxConnections = defaultMaxConnections(); maxConnectionsPerHost = defaultMaxConnectionsPerHost(); name = defaultName(); connectTimeout = defaultConnectTimeout(); webSocketTimeout = defaultWebSocketTimeout(); pooledConnectionIdleTimeout = defaultPooledConnectionIdleTimeout(); readTimeout = defaultReadTimeout(); requestTimeout = defaultRequestTimeout(); connectionTTL = defaultConnectionTTL(); followRedirect = defaultFollowRedirect(); maxRedirects = defaultMaxRedirects(); compressionEnforced = defaultCompressionEnforced(); userAgent = defaultUserAgent(); allowPoolingConnections = defaultAllowPoolingConnections(); maxRequestRetry = defaultMaxRequestRetry(); ioThreadMultiplier = defaultIoThreadMultiplier(); allowPoolingSslConnections = defaultAllowPoolingSslConnections(); disableUrlEncodingForBoundRequests = defaultDisableUrlEncodingForBoundRequests(); strict302Handling = defaultStrict302Handling(); acceptAnyCertificate = defaultAcceptAnyCertificate(); sslSessionCacheSize = defaultSslSessionCacheSize(); sslSessionTimeout = defaultSslSessionTimeout(); if (defaultUseProxySelector()) { proxyServerSelector = ProxyUtils.getJdkDefaultProxyServerSelector(); } else if (defaultUseProxyProperties()) { proxyServerSelector = ProxyUtils.createProxyServerSelector(System.getProperties()); } }