Class InMemoryCachingHttpClientFactoryBean
java.lang.Object
net.shibboleth.shared.httpclient.HttpClientBuilder
net.shibboleth.shared.httpclient.InMemoryCachingHttpClientBuilder
net.shibboleth.shared.spring.httpclient.factory.InMemoryCachingHttpClientFactoryBean
- All Implemented Interfaces:
FactoryBean<org.apache.hc.client5.http.classic.HttpClient>
public class InMemoryCachingHttpClientFactoryBean
extends InMemoryCachingHttpClientBuilder
implements FactoryBean<org.apache.hc.client5.http.classic.HttpClient>
Factory bean version of
InMemoryCachingHttpClientBuilder.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanSingleton flag.private org.apache.hc.client5.http.classic.HttpClientOur captive client in singleton cases.Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.client5.http.classic.HttpClientClass<org.apache.hc.client5.http.classic.HttpClient>booleanvoidsetSingleton(boolean flag) Set if a singleton should be created, or a new object on each request otherwise.Methods inherited from class net.shibboleth.shared.httpclient.InMemoryCachingHttpClientBuilder
decorateApacheBuilder, getMaxCacheEntries, getMaxCacheEntrySize, setMaxCacheEntries, setMaxCacheEntrySizeMethods inherited from class net.shibboleth.shared.httpclient.HttpClientBuilder
buildClient, buildConnectionFactory, buildConnectionManager, buildDefaultConnectionConfig, buildDefaultCredentialsProvider, buildDefaultRequestConfig, buildRoutePlanner, getConnectionProxyHost, getConnectionProxyPassword, getConnectionProxyPort, getConnectionProxyUsername, getConnectionRequestTimeout, getConnectionTimeout, getFirstRequestInterceptors, getFirstResponseInterceptors, getHttpContentCharSet, getHttpRequestRetryStrategy, getLastRequestInterceptors, getLastResponseInterceptors, getMaxConnectionsPerRoute, getMaxConnectionsTotal, getResponseTimeout, getSchemePortResolver, getSocketBufferSize, getSocketLocalAddress, getSocketTimeout, getStaticContextHandlers, getTLSSocketFactory, getUserAgent, handleFluentProperties, isConnectionCloseAfterResponse, isConnectionDisregardTLSCertificate, isDisableAuthCaching, isDisableAutomaticRetries, isDisableConnectionState, isDisableContentCompression, isDisableCookieManagement, isDisableRedirectHandling, isEvictExpiredConnections, isEvictIdleConnections, isHttpFollowRedirects, isUseSystemProperties, resetDefaults, setConnectionCloseAfterResponse, setConnectionDisregardTLSCertificate, setConnectionMaxIdleTime, setConnectionProxyHost, setConnectionProxyPassword, setConnectionProxyPort, setConnectionProxyUsername, setConnectionRequestTimeout, setConnectionTimeout, setDisableAuthCaching, setDisableAutomaticRetries, setDisableConnectionState, setDisableContentCompression, setDisableCookieManagement, setDisableRedirectHandling, setEvictExpiredConnections, setEvictIdleConnections, setFirstRequestInterceptors, setFirstResponseInterceptors, setHttpContentCharSet, setHttpFollowRedirects, setHttpRequestRetryStrategy, setLastRequestInterceptors, setLastResponseInterceptors, setMaxConnectionsPerRoute, setMaxConnectionsTotal, setResponseTimeout, setSchemePortResolver, setSocketBufferSize, setSocketLocalAddress, setSocketLocalAddress, setSocketTimeout, setStaticContextHandlers, setTLSSocketFactory, setUserAgent, setUseSystemProperties, setValidateAfterInactivity
-
Field Details
-
singleton
private boolean singletonSingleton flag. -
singletonInstance
@Nullable private org.apache.hc.client5.http.classic.HttpClient singletonInstanceOur captive client in singleton cases.
-
-
Constructor Details
-
InMemoryCachingHttpClientFactoryBean
public InMemoryCachingHttpClientFactoryBean()Constructor.
-
-
Method Details
-
setSingleton
public void setSingleton(boolean flag) Set if a singleton should be created, or a new object on each request otherwise. Default istrue(a singleton).- Parameters:
flag- flag to set
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<org.apache.hc.client5.http.classic.HttpClient>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<org.apache.hc.client5.http.classic.HttpClient>
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<org.apache.hc.client5.http.classic.HttpClient>- Throws:
Exception
-