Package com.helger.httpclient
Class HttpClientSettingsConfig.HttpClientConfig
java.lang.Object
com.helger.httpclient.HttpClientSettingsConfig.HttpClientConfig
- Enclosing class:
HttpClientSettingsConfig
-
Constructor Summary
ConstructorsConstructorDescriptionHttpClientConfig(com.helger.config.fallback.IConfigWithFallback aConfig, com.helger.collection.commons.ICommonsOrderedSet<String> aConfigPrefixes) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.util.Timeoutorg.apache.hc.core5.util.Timeoutcom.helger.base.state.ETriStategetDisableCertificateCheck(boolean bDefault) com.helger.base.state.ETriStategetDisableHostnameCheck(boolean bDefault) com.helger.base.state.ETriStategetDisableTlsChecks(boolean bDefault) com.helger.base.state.ETriStategetFollowRedirects(boolean bDefault) org.apache.hc.client5.http.auth.UsernamePasswordCredentialscom.helger.base.state.ETriStategetHttpProxyEnabled(boolean bDefault) org.apache.hc.core5.http.HttpHostchar[]intcom.helger.base.state.ETriStategetProtocolUpgradeEnabled(boolean bDefault) Get the configuration value on protocol upgrade is enabled or not.org.apache.hc.core5.util.Timeoutcom.helger.base.state.ETriStategetRetryAlways(boolean bDefault) intcom.helger.base.state.ETriStategetUseDNSClientCache(boolean bDefault) com.helger.base.state.ETriStategetUseKeepAlive(boolean bDefault)
-
Constructor Details
-
HttpClientConfig
public HttpClientConfig(@Nonnull com.helger.config.fallback.IConfigWithFallback aConfig, @Nonnull @Nonempty com.helger.collection.commons.ICommonsOrderedSet<String> aConfigPrefixes)
-
-
Method Details
-
getUseDNSClientCache
@Nonnull public com.helger.base.state.ETriState getUseDNSClientCache(boolean bDefault) -
getHttpProxyEnabled
@Nonnull public com.helger.base.state.ETriState getHttpProxyEnabled(boolean bDefault) -
getHttpProxyHost
- Returns:
- The HttpProxy host to be used. May be
null.
-
getHttpProxyPort
@CheckForSigned public int getHttpProxyPort()- Returns:
- The HTTP proxy port to be used, or
0in case it is not found.
-
getHttpProxyObject
@Nullable public org.apache.hc.core5.http.HttpHost getHttpProxyObject()- Returns:
- The HttpProxy object to be used. This is only non-
nullif proxy host is non-nulland proxy port returns a value > 0. - See Also:
-
getHttpProxyUsername
- Returns:
- The HttpProxy user name to be used. May be
null.
-
getHttpProxyPasswordCharArray
@Nullable public char[] getHttpProxyPasswordCharArray()- Returns:
- The HttpProxy password to be used. May be
null.
-
getHttpProxyCredentials
@Nullable public org.apache.hc.client5.http.auth.UsernamePasswordCredentials getHttpProxyCredentials()- Returns:
- The
UsernamePasswordCredentialsobject to be used for proxy server authentication ornullif not username and password are configured. - See Also:
-
getNonProxyHosts
- Returns:
- A pipe separated list of non-proxy hosts. E.g.
localhost|127.0.0.1. May benull.
-
getRetryCount
@CheckForSigned public int getRetryCount() -
getRetryInterval
- Returns:
- The interval in which a retry should happen. Only relevant is retry count > 0.
- See Also:
-
getRetryAlways
@Nonnull public com.helger.base.state.ETriState getRetryAlways(boolean bDefault) -
getConnectionRequestTimeout
@Nullable public org.apache.hc.core5.util.Timeout getConnectionRequestTimeout() -
getConnectTimeout
@Nullable public org.apache.hc.core5.util.Timeout getConnectTimeout() -
getResponseTimeout
@Nullable public org.apache.hc.core5.util.Timeout getResponseTimeout() -
getUserAgent
-
getFollowRedirects
@Nonnull public com.helger.base.state.ETriState getFollowRedirects(boolean bDefault) -
getUseKeepAlive
@Nonnull public com.helger.base.state.ETriState getUseKeepAlive(boolean bDefault) -
getProtocolUpgradeEnabled
@Nonnull public com.helger.base.state.ETriState getProtocolUpgradeEnabled(boolean bDefault) Get the configuration value on protocol upgrade is enabled or not.- Parameters:
bDefault- The default value to be used.- Returns:
- Never
null. - Since:
- 10.5.0
-
getDisableTlsChecks
@Nonnull public com.helger.base.state.ETriState getDisableTlsChecks(boolean bDefault) -
getDisableHostnameCheck
@Nonnull public com.helger.base.state.ETriState getDisableHostnameCheck(boolean bDefault) -
getDisableCertificateCheck
@Nonnull public com.helger.base.state.ETriState getDisableCertificateCheck(boolean bDefault)
-