public static class HttpClientConfiguration.Builder extends Object
HttpClientConfigurations. At the very least, a thread name prefix and an owner name must be provided.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
HttpClientConfiguration |
build() |
HttpClientConfiguration.Builder |
setClientSocketProperties(TcpClientSocketProperties clientSocketProperties)
Optionally defines TCP specific properties like the socket connection timeout, for example, via a
TcpClientSocketProperties. |
HttpClientConfiguration.Builder |
setConnectionIdleTimeout(int connectionIdleTimeout)
Defines the number of milliseconds that a connection can remain idle before being closed.
|
HttpClientConfiguration.Builder |
setMaxConnections(int maxConnections)
Defines the maximum number of outbound connections that will be kept open at the same time.
|
HttpClientConfiguration.Builder |
setOwnerName(String ownerName)
Defines the name of the
HttpClient's owner. |
HttpClientConfiguration.Builder |
setProxyConfig(ProxyConfig proxyConfig)
Required when connecting through a proxy, this defines the relevant data to do so using a
ProxyConfig. |
HttpClientConfiguration.Builder |
setThreadNamePrefix(String threadNamePrefix)
Defines the prefix to use to name the
HttpClient's threads. |
HttpClientConfiguration.Builder |
setTlsContextFactory(org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory)
Required exclusively for HTTPS, this defines through a
TlsContextFactory all the TLS related data to establish
such connections. |
HttpClientConfiguration.Builder |
setUsePersistentConnections(boolean usePersistentConnections)
Defines if connections should be kept after a request is completed or closed.
|
public HttpClientConfiguration.Builder setTlsContextFactory(org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory)
TlsContextFactory all the TLS related data to establish
such connections. Set to null by default.tlsContextFactory - a TlsContextFactory with the required data.public HttpClientConfiguration.Builder setProxyConfig(ProxyConfig proxyConfig)
ProxyConfig. Set to
null by default.proxyConfig - a ProxyConfig specifying the proxy datapublic HttpClientConfiguration.Builder setClientSocketProperties(TcpClientSocketProperties clientSocketProperties)
TcpClientSocketProperties. Set to null by default, transport default values will be used in that case.clientSocketProperties - a TcpClientSocketProperties specifying each propertypublic HttpClientConfiguration.Builder setMaxConnections(int maxConnections)
maxConnections - number of connections to allowpublic HttpClientConfiguration.Builder setUsePersistentConnections(boolean usePersistentConnections)
true.usePersistentConnections - boolean specifying the decisionpublic HttpClientConfiguration.Builder setConnectionIdleTimeout(int connectionIdleTimeout)
connectionIdleTimeout - timeout value (in milliseconds)public HttpClientConfiguration.Builder setThreadNamePrefix(String threadNamePrefix)
HttpClient's threads. Must be specified.threadNamePrefix - a String representing the prefixpublic HttpClientConfiguration.Builder setOwnerName(String ownerName)
HttpClient's owner. Must be specified.ownerName - a String with the namepublic HttpClientConfiguration build()
HttpClientConfiguration as specified.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.