public class HttpClientBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpClientBuilder.HostnameVerificationPolicy |
Modifier and Type | Field and Description |
---|---|
protected KeyStore |
clientKeyStore |
protected String |
clientPrivateKeyPassword |
protected int |
connectionPoolSize |
protected long |
connectionTTL |
protected TimeUnit |
connectionTTLUnit |
protected boolean |
disableCookieCache |
protected boolean |
disableTrustManager |
protected long |
establishConnectionTimeout |
protected TimeUnit |
establishConnectionTimeoutUnits |
protected int |
maxPooledPerRoute |
protected HttpClientBuilder.HostnameVerificationPolicy |
policy |
protected org.apache.http.HttpHost |
proxyHost |
protected long |
socketTimeout |
protected TimeUnit |
socketTimeoutUnits |
protected SSLContext |
sslContext |
protected KeyStore |
truststore |
protected HostnameVerifier |
verifier |
Constructor and Description |
---|
HttpClientBuilder() |
Modifier and Type | Method and Description |
---|---|
org.apache.http.client.HttpClient |
build() |
org.apache.http.client.HttpClient |
build(AdapterHttpClientConfig adapterConfig) |
HttpClientBuilder |
connectionPoolSize(int connectionPoolSize) |
HttpClientBuilder |
connectionTTL(long ttl,
TimeUnit unit) |
HttpClientBuilder |
disableCookieCache(boolean disable) |
HttpClientBuilder |
disableTrustManager()
Disable trust management and hostname verification.
|
HttpClientBuilder |
establishConnectionTimeout(long timeout,
TimeUnit unit)
When trying to make an initial socket connection, what is the timeout?
|
HttpClientBuilder |
hostnameVerification(HttpClientBuilder.HostnameVerificationPolicy policy)
SSL policy used to verify hostnames
|
HttpClientBuilder |
keyStore(KeyStore keyStore,
char[] password) |
HttpClientBuilder |
keyStore(KeyStore keyStore,
String password) |
HttpClientBuilder |
maxPooledPerRoute(int maxPooledPerRoute) |
HttpClientBuilder |
socketTimeout(long timeout,
TimeUnit unit)
Socket inactivity timeout
|
HttpClientBuilder |
sslContext(SSLContext sslContext) |
HttpClientBuilder |
trustStore(KeyStore truststore) |
protected KeyStore truststore
protected KeyStore clientKeyStore
protected String clientPrivateKeyPassword
protected boolean disableTrustManager
protected boolean disableCookieCache
protected HttpClientBuilder.HostnameVerificationPolicy policy
protected SSLContext sslContext
protected int connectionPoolSize
protected int maxPooledPerRoute
protected long connectionTTL
protected TimeUnit connectionTTLUnit
protected HostnameVerifier verifier
protected long socketTimeout
protected TimeUnit socketTimeoutUnits
protected long establishConnectionTimeout
protected TimeUnit establishConnectionTimeoutUnits
protected org.apache.http.HttpHost proxyHost
public HttpClientBuilder socketTimeout(long timeout, TimeUnit unit)
timeout
- unit
- public HttpClientBuilder establishConnectionTimeout(long timeout, TimeUnit unit)
timeout
- unit
- public HttpClientBuilder connectionTTL(long ttl, TimeUnit unit)
public HttpClientBuilder maxPooledPerRoute(int maxPooledPerRoute)
public HttpClientBuilder connectionPoolSize(int connectionPoolSize)
public HttpClientBuilder disableTrustManager()
public HttpClientBuilder disableCookieCache(boolean disable)
public HttpClientBuilder hostnameVerification(HttpClientBuilder.HostnameVerificationPolicy policy)
policy
- public HttpClientBuilder sslContext(SSLContext sslContext)
public HttpClientBuilder trustStore(KeyStore truststore)
public HttpClientBuilder keyStore(KeyStore keyStore, String password)
public HttpClientBuilder keyStore(KeyStore keyStore, char[] password)
public org.apache.http.client.HttpClient build()
public org.apache.http.client.HttpClient build(AdapterHttpClientConfig adapterConfig)
Copyright © 2019 JBoss by Red Hat. All rights reserved.