public class HttpClientFactoryBean extends AbstractComponentAwareFactoryBean<HttpClient>
HttpClientBuilder and to then emit a HttpClient.
This class will likely either be removed or moved into an implementation package.
Use HttpClientBuilder instead.
| Modifier and Type | Field and Description |
|---|---|
private HttpClientBuilder |
builder
Deprecated.
Our captive builder.
|
private long |
connectionRequestTimeout
Deprecated.
Connection request timeout.
We need this field to ensure that Spring does the conversion. |
private long |
connectionTimeout
Deprecated.
Connection timeout.
We need this field to ensure that Spring does the conversion. |
private long |
socketTimeout
Deprecated.
Socket timeout.
We need this field to ensure that Spring does the conversion. |
| Constructor and Description |
|---|
HttpClientFactoryBean()
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpClientBuilder |
createHttpClientBuilder()
Deprecated.
Create and return the instance of
HttpClientBuilder to use. |
protected HttpClient |
doCreateInstance()
Deprecated.
Call the parent class to create the instance.
|
protected HttpClientBuilder |
getHttpClientBuilder()
Deprecated.
Get the instance of
HttpClientBuilder to use. |
Class<HttpClient> |
getObjectType()
Deprecated.
|
void |
setConnectionDisregardTLSCertificate(boolean disregard)
Deprecated.
Sets whether the responder's SSL/TLS certificate should be ignored.
|
void |
setConnectionProxyHost(String host)
Deprecated.
Sets the hostname of the default proxy used when making connection.
|
void |
setConnectionProxyPassword(String password)
Deprecated.
Sets the password used when authenticating to the proxy.
|
void |
setConnectionProxyPort(int port)
Deprecated.
Sets the port of the default proxy used when making connection.
|
void |
setConnectionProxyUsername(String usename)
Deprecated.
Sets the username to use when authenticating to the proxy.
|
void |
setConnectionRequestTimeout(long timeout)
Deprecated.
Sets the maximum length of time in milliseconds to wait for a connection to be returned from the connection
manager.
|
void |
setConnectionTimeout(long timeout)
Deprecated.
Sets the maximum length of time in milliseconds to wait for the connection to be established.
|
void |
setDisableContentCompression(boolean disable)
Deprecated.
Sets whether to disable content compression.
|
void |
setDisableCookieManagement(boolean disable)
Deprecated.
Sets whether to disable cookie management.
|
void |
setMaxConnectionsPerRoute(int max)
Deprecated.
Sets the max simultaneous connections per route allowed by the pooling connection manager.
|
void |
setMaxConnectionsTotal(int max)
Deprecated.
Sets the max total simultaneous connections allowed by the pooling connection manager.
|
void |
setSocketTimeout(long timeout)
Deprecated.
Sets the maximum period inactivity between two consecutive data packets in milliseconds.
|
void |
setTLSSocketFactory(LayeredConnectionSocketFactory factory)
Deprecated.
Set the TLS socket factory to use.
|
void |
setUserAgent(String agent)
Deprecated.
Sets the user agent to be used when talking to the server.
|
createInstance, destroyInstanceprivate final HttpClientBuilder builder
@Duration private long connectionTimeout
@Duration private long connectionRequestTimeout
@Duration private long socketTimeout
public Class<HttpClient> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<HttpClient>getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<HttpClient>public void setMaxConnectionsTotal(int max)
max - the max total connectionpublic void setMaxConnectionsPerRoute(int max)
max - the max connections per route@Duration public void setConnectionTimeout(@Duration long timeout)
timeout - maximum length of time in milliseconds to wait for the connection to be established@Duration public void setConnectionRequestTimeout(@Duration long timeout)
timeout - maximum length of time in milliseconds to wait for a connection from the connection manager@Duration public void setSocketTimeout(@Duration long timeout)
timeout - maximum length of time in milliseconds between two consecutive data packetspublic void setTLSSocketFactory(@Nullable LayeredConnectionSocketFactory factory)
factory - the new socket factory, may be nullpublic void setConnectionDisregardTLSCertificate(boolean disregard)
disregard - whether the responder's SSL/TLS certificate should be ignoredpublic void setConnectionProxyHost(@Nullable String host)
host - hostname of the default proxy used when making connectionpublic void setConnectionProxyPort(int port)
port - port of the default proxy used when making connection; must be greater than 0 and less than 65536public void setConnectionProxyUsername(@Nullable String usename)
usename - username to use when authenticating to the proxy; may be nullpublic void setConnectionProxyPassword(@Nullable String password)
password - password used when authenticating to the proxy; may be nullpublic void setUserAgent(@Nullable String agent)
agent - what to setpublic void setDisableContentCompression(boolean disable)
disable - whether to disable content compressionpublic void setDisableCookieManagement(boolean disable)
disable - whether to disable cookie managementprotected HttpClientBuilder createHttpClientBuilder()
HttpClientBuilder to use.
Subclasses may override to build a specialized subclass.protected HttpClientBuilder getHttpClientBuilder()
HttpClientBuilder to use.protected HttpClient doCreateInstance() throws Exception
doCreateInstance in class AbstractComponentAwareFactoryBean<HttpClient>Exception - if needed.Copyright © 1999–2019 Shibboleth Consortium. All rights reserved.