Class FileCachingHttpClientFactoryBean
java.lang.Object
net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder
net.shibboleth.utilities.java.support.httpclient.FileCachingHttpClientBuilder
net.shibboleth.ext.spring.factory.FileCachingHttpClientFactoryBean
- All Implemented Interfaces:
DisposableBean
,FactoryBean<org.apache.http.client.HttpClient>
public class FileCachingHttpClientFactoryBean
extends FileCachingHttpClientBuilder
implements FactoryBean<org.apache.http.client.HttpClient>, DisposableBean
Factory bean version of
FileCachingHttpClientBuilder
.
This is different than the other factories in order to limit non-singleton use and implement init/destroy. This can't handle prototypes but that makes no sense when you consider a shared cache in one directory wouldn't work anyway.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.http.client.HttpClient
Our captive client in singleton cases.Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.shibboleth.utilities.java.support.httpclient.FileCachingHttpClientBuilder
buildClient, decorateApacheBuilder, getCacheDirectory, getMaintentanceTaskInterval, getMaxCacheEntries, getMaxCacheEntrySize, setCacheDirectory, setCacheDirectory, setMaintentanceTaskInterval, setMaxCacheEntries, setMaxCacheEntrySize
Methods inherited from class net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder
getApacheBuilder, getConnectionProxyHost, getConnectionProxyPassword, getConnectionProxyPort, getConnectionProxyUsername, getConnectionRequestTimeout, getConnectionTimeout, getFirstRequestInterceptors, getFirstResponseInterceptors, getHttpContentCharSet, getHttpRequestRetryHandler, getLastRequestInterceptors, getLastResponseInterceptors, getMaxConnectionsPerRoute, getMaxConnectionsTotal, getServiceUnavailableRetryHandler, getSocketBufferSize, getSocketLocalAddress, getSocketTimeout, getStaticContextHandlers, getTLSSocketFactory, getUserAgent, isConnectionCloseAfterResponse, isConnectionDisregardTLSCertificate, isConnectionStalecheck, isConnectionStaleCheck, isDisableAuthCaching, isDisableAutomaticRetries, isDisableConnectionState, isDisableContentCompression, isDisableCookieManagement, isDisableRedirectHandling, isHttpFollowRedirects, isUseSystemProperties, resetDefaults, setConnectionCloseAfterResponse, setConnectionDisregardTLSCertificate, setConnectionProxyHost, setConnectionProxyPassword, setConnectionProxyPort, setConnectionProxyUsername, setConnectionRequestTimeout, setConnectionStalecheck, setConnectionStaleCheck, setConnectionTimeout, setDisableAuthCaching, setDisableAutomaticRetries, setDisableConnectionState, setDisableContentCompression, setDisableCookieManagement, setDisableRedirectHandling, setFirstRequestInterceptors, setFirstResponseInterceptors, setHttpContentCharSet, setHttpFollowRedirects, setHttpRequestRetryHandler, setLastRequestInterceptors, setLastResponseInterceptors, setMaxConnectionsPerRoute, setMaxConnectionsTotal, setServiceUnavailableRetryHandler, setSocketBufferSize, setSocketLocalAddress, setSocketLocalAddress, setSocketTimeout, setStaticContextHandlers, setTLSSocketFactory, setUserAgent, setUseSystemProperties
-
Field Details
-
singletonInstance
@Nullable private org.apache.http.client.HttpClient singletonInstanceOur captive client in singleton cases.
-
-
Constructor Details
-
FileCachingHttpClientFactoryBean
public FileCachingHttpClientFactoryBean()
-
-
Method Details
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceFactoryBean<org.apache.http.client.HttpClient>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<org.apache.http.client.HttpClient>
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
-
getObject
- Specified by:
getObject
in interfaceFactoryBean<org.apache.http.client.HttpClient>
- Throws:
Exception
-