Interface HttpClientHandler.ConfTemplate<T extends HttpClientHandler.ConfTemplate<T>>
-
- Type Parameters:
T- Type of the Builder using this configuration.
- All Known Implementing Classes:
AbstractAPIHandler.Conf,AbstractRemoteAuthTokenAPIHandler.Conf,AbstractTokenAPIHandler.Conf,AbstractVersionAPIHandler.Conf,CodeFlowAuthTokenAPIHandler.Builder,CodeFlowAuthTokenAPIHandler.Conf,DefaultHttpClientHandler.Builder,DefaultHttpClientHandler.Conf,EnvironmentTokenAPIHandler.Builder,EnvironmentTokenAPIHandler.Conf,FixedTokenAPIHandler.Builder,FixedTokenAPIHandler.Conf,GraphConnectionHandler.Builder,GraphConnectionHandler.Conf,PasswordAuthTokenAPIHandler.Builder,PasswordAuthTokenAPIHandler.Conf
- Enclosing interface:
- HttpClientHandler
public static interface HttpClientHandler.ConfTemplate<T extends HttpClientHandler.ConfTemplate<T>>Interface for the configuration parameters of a HttpClientHandler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.BooleangetAcceptAllCerts()java.lang.LonggetConnectTimeout()java.net.CookieManagergetCookieManager()java.net.http.HttpClientgetHttpClient()java.lang.BooleangetHttpClientAutoClose()intgetMaxBinaryLogLength()intgetMaxConnectionPool()HttpClientHandler.ProxySpecgetProxy()longgetShutdownTimeout()javax.net.ssl.SSLContextgetSslContext()javax.net.ssl.SSLParametersgetSslParameters()booleanisFollowRedirects()TsetAcceptAllCerts(java.lang.Boolean acceptAllCerts)Skip SSL certificate verification.TsetConnectTimeout(java.lang.Long connectTimeout)TsetCookieManager(java.net.CookieManager cookieManager)Instance of an externally configured CookieManager.TsetFollowRedirects(boolean followRedirects)TsetHttpClient(java.net.http.HttpClient httpClient)Instance of an externally configured http client.TsetHttpClientAutoClose(boolean httpClientAutoClose)Close internal httpClient automatically, even when it has been set externally.TsetMaxBinaryLogLength(int maxBinaryLogLength)Maximum size to log binary data in logfiles.TsetMaxConnectionPool(int maxConnectionPool)Set the maximum of open connections for this HttpClient (This sets the fixedThreadPool for the Executor of the HttpClient).TsetProxy(HttpClientHandler.ProxySpec proxy)TsetShutdownTimeout(long shutdownTimeout)TsetSslContext(javax.net.ssl.SSLContext sslContext)TsetSslParameters(javax.net.ssl.SSLParameters sslParameters)
-
-
-
Method Detail
-
getProxy
HttpClientHandler.ProxySpec getProxy()
-
setProxy
T setProxy(HttpClientHandler.ProxySpec proxy)
- Parameters:
proxy- Simple proxy with one address and port- Returns:
- self()
-
isFollowRedirects
boolean isFollowRedirects()
-
setFollowRedirects
T setFollowRedirects(boolean followRedirects)
- Parameters:
followRedirects- Enable Redirect.NORMAL. Default is true.- Returns:
- self()
-
getConnectTimeout
java.lang.Long getConnectTimeout()
-
setConnectTimeout
T setConnectTimeout(java.lang.Long connectTimeout)
- Parameters:
connectTimeout- Connect timeout in milliseconds.- Returns:
- self()
-
getShutdownTimeout
long getShutdownTimeout()
-
setShutdownTimeout
T setShutdownTimeout(long shutdownTimeout)
- Parameters:
shutdownTimeout- Time to wait in milliseconds for a complete shutdown of the Java 11 HttpClientImpl. If this is set to a value too low, you might need to wait elsewhere for the HttpClient to shut down properly. Default is 3000ms.- Returns:
- self()
-
getAcceptAllCerts
java.lang.Boolean getAcceptAllCerts()
-
setAcceptAllCerts
T setAcceptAllCerts(java.lang.Boolean acceptAllCerts)
Skip SSL certificate verification. Leave this unset to use the default in HttpClient. Setting this to true installs a permissive SSLContext, setting it to false removes the SSLContext to use the default.- Parameters:
acceptAllCerts- the toggle- Returns:
- self()
-
getSslContext
javax.net.ssl.SSLContext getSslContext()
-
setSslContext
T setSslContext(javax.net.ssl.SSLContext sslContext)
- Parameters:
sslContext- The specific SSLContext to use.- Returns:
- self()
- See Also:
setAcceptAllCerts(Boolean)
-
getSslParameters
javax.net.ssl.SSLParameters getSslParameters()
-
setSslParameters
T setSslParameters(javax.net.ssl.SSLParameters sslParameters)
- Parameters:
sslParameters- The specific SSLParameters to use.- Returns:
- self()
-
getHttpClient
java.net.http.HttpClient getHttpClient()
-
setHttpClient
T setHttpClient(java.net.http.HttpClient httpClient)
Instance of an externally configured http client. An internal HttpClient will be built with parameters given by this Builder if this is not set.- Parameters:
httpClient- Instance of an HttpClient.- Returns:
- self()
- Implementation Note:
- Be aware, that any httpClient given via this method will be marked as external and has to be
closed externally as well. A call to
DefaultHttpClientHandler.close()with an external httpclient will have no effect.
-
getCookieManager
java.net.CookieManager getCookieManager()
-
setCookieManager
T setCookieManager(java.net.CookieManager cookieManager)
Instance of an externally configured CookieManager. An internal CookieManager will be built if this is not set.- Parameters:
cookieManager- Instance of a CookieManager.- Returns:
- self()
-
getMaxConnectionPool
int getMaxConnectionPool()
-
setMaxConnectionPool
T setMaxConnectionPool(int maxConnectionPool)
Set the maximum of open connections for this HttpClient (This sets the fixedThreadPool for the Executor of the HttpClient).- Parameters:
maxConnectionPool- Maximum size of the pool. Default is 8.- Returns:
- self()
-
getMaxBinaryLogLength
int getMaxBinaryLogLength()
-
setMaxBinaryLogLength
T setMaxBinaryLogLength(int maxBinaryLogLength)
Maximum size to log binary data in logfiles. Default is 1024.- Parameters:
maxBinaryLogLength- Size in bytes- Returns:
- self()
-
getHttpClientAutoClose
java.lang.Boolean getHttpClientAutoClose()
-
setHttpClientAutoClose
T setHttpClientAutoClose(boolean httpClientAutoClose)
Close internal httpClient automatically, even when it has been set externally.
The default is to close the internal httpClient when it has been created internally and to not close the internal httpClient when it has been set via
setHttpClient(HttpClient)- Parameters:
httpClientAutoClose- true: enable, false: disable.- Returns:
- self()
-
-