@NotThreadSafe public class DefaultApacheHttpClientBuilder extends Object implements ApacheHttpClientBuilder
| 限定符和类型 | 类和说明 |
|---|---|
static class |
DefaultApacheHttpClientBuilder.IdleConnectionMonitorThread |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.http.impl.client.CloseableHttpClient |
build()
构建httpclient实例.
|
static DefaultApacheHttpClientBuilder |
get() |
DefaultApacheHttpClientBuilder.IdleConnectionMonitorThread |
getIdleConnectionMonitorThread() |
ApacheHttpClientBuilder |
httpProxyHost(String httpProxyHost)
代理服务器地址.
|
ApacheHttpClientBuilder |
httpProxyPassword(String httpProxyPassword)
代理服务器密码.
|
ApacheHttpClientBuilder |
httpProxyPort(int httpProxyPort)
代理服务器端口.
|
ApacheHttpClientBuilder |
httpProxyUsername(String httpProxyUsername)
代理服务器用户名.
|
ApacheHttpClientBuilder |
httpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler httpRequestRetryHandler)
重试策略.
|
ApacheHttpClientBuilder |
keepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
超时时间.
|
ApacheHttpClientBuilder |
sslConnectionSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory sslConnectionSocketFactory)
ssl连接socket工厂.
|
ApacheHttpClientBuilder |
supportedProtocols(String[] supportedProtocols)
支持的TLS协议版本.
|
public static DefaultApacheHttpClientBuilder get()
public ApacheHttpClientBuilder httpProxyHost(String httpProxyHost)
ApacheHttpClientBuilderhttpProxyHost 在接口中 ApacheHttpClientBuilderhttpProxyHost - 代理服务器地址public ApacheHttpClientBuilder httpProxyPort(int httpProxyPort)
ApacheHttpClientBuilderhttpProxyPort 在接口中 ApacheHttpClientBuilderhttpProxyPort - 代理服务器端口public ApacheHttpClientBuilder httpProxyUsername(String httpProxyUsername)
ApacheHttpClientBuilderhttpProxyUsername 在接口中 ApacheHttpClientBuilderhttpProxyUsername - 代理服务器用户名public ApacheHttpClientBuilder httpProxyPassword(String httpProxyPassword)
ApacheHttpClientBuilderhttpProxyPassword 在接口中 ApacheHttpClientBuilderhttpProxyPassword - 代理服务器密码public ApacheHttpClientBuilder httpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler httpRequestRetryHandler)
ApacheHttpClientBuilderhttpRequestRetryHandler 在接口中 ApacheHttpClientBuilderhttpRequestRetryHandler - 重试处理器public ApacheHttpClientBuilder keepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
ApacheHttpClientBuilderkeepAliveStrategy 在接口中 ApacheHttpClientBuilderkeepAliveStrategy - 保持连接策略public ApacheHttpClientBuilder sslConnectionSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory sslConnectionSocketFactory)
ApacheHttpClientBuildersslConnectionSocketFactory 在接口中 ApacheHttpClientBuildersslConnectionSocketFactory - SSL连接Socket工厂public ApacheHttpClientBuilder supportedProtocols(String[] supportedProtocols)
ApacheHttpClientBuildersupportedProtocols 在接口中 ApacheHttpClientBuildersupportedProtocols - 支持的协议版本数组public DefaultApacheHttpClientBuilder.IdleConnectionMonitorThread getIdleConnectionMonitorThread()
public org.apache.http.impl.client.CloseableHttpClient build()
ApacheHttpClientBuilderbuild 在接口中 ApacheHttpClientBuilderCopyright © 2026. All rights reserved.