Package jetbrains.buildServer.util
Class HttpClientConfigurator
- java.lang.Object
-
- jetbrains.buildServer.util.HttpClientConfigurator
-
public class HttpClientConfigurator extends Object
Used to preconfigure HttpClient proxy/certificates/authentication
-
-
Constructor Summary
Constructors Constructor Description HttpClientConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
configureProxy(org.apache.http.client.CredentialsProvider credentialsProvider)
Add corresponding proxy-server settings into specifiedCredentialsProvider
.SSLContext
createSSLContext(KeyStore trustStore)
org.apache.http.conn.ssl.SSLConnectionSocketFactory
createSSLSocketFactory(KeyStore trustStore, boolean allowNonSecureConnection)
Deprecated.use createSSLContext / getX509HostnameVerifier insteadorg.apache.http.conn.ssl.X509HostnameVerifier
getX509HostnameVerifier(boolean allowNonSecureConnection)
-
-
-
Method Detail
-
configureProxy
public void configureProxy(org.apache.http.client.CredentialsProvider credentialsProvider)
Add corresponding proxy-server settings into specifiedCredentialsProvider
. It uses System or TeamCity properties like:-Dhttp(s).proxyHost=proxy.domain.com -Dhttp(s).proxyPort=8080 -Dhttp(s).nonProxyHosts=domain.com teamcity.http(s).proxyHost=proxy.domain.com teamcity.http(s).proxyPort=8080 teamcity.http(s).nonProxyHosts=localhost|*.mydomain.com teamcity.http(s).proxyAuthenticationType=basic teamcity.http(s).proxyLogin=username teamcity.http(s).proxyPassword=password
- Parameters:
credentialsProvider
- provider for configure
-
createSSLSocketFactory
@NotNull @Deprecated public org.apache.http.conn.ssl.SSLConnectionSocketFactory createSSLSocketFactory(@Nullable KeyStore trustStore, boolean allowNonSecureConnection)
Deprecated.use createSSLContext / getX509HostnameVerifier insteadCreateSSLConnectionSocketFactory
with custom trust store and proper hostname verifier strategy. Not needed for httpclient-4.5 since SNI support is on by default.- Parameters:
trustStore
- key store with user trusted certificates ofnull
allowNonSecureConnection
- false if strict hostname verifier have to be used; otherwise true- Returns:
- not null
SSLConnectionSocketFactory
-
createSSLContext
@Nullable public SSLContext createSSLContext(@Nullable KeyStore trustStore)
-
getX509HostnameVerifier
@NotNull public org.apache.http.conn.ssl.X509HostnameVerifier getX509HostnameVerifier(boolean allowNonSecureConnection)
-
-