Module net.shibboleth.ext.spring
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 ofFileCachingHttpClientBuilder.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
Fields Modifier and Type Field Description private org.apache.http.client.HttpClientsingletonInstanceOur captive client in singleton cases.-
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description FileCachingHttpClientFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()org.apache.http.client.HttpClientgetObject()Class<org.apache.http.client.HttpClient>getObjectType()booleanisSingleton()-
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
-
-
-
-
Method Detail
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceFactoryBean<org.apache.http.client.HttpClient>
-
getObjectType
public Class<org.apache.http.client.HttpClient> getObjectType()
- Specified by:
getObjectTypein interfaceFactoryBean<org.apache.http.client.HttpClient>
-
destroy
public void destroy()
- Specified by:
destroyin interfaceDisposableBean
-
getObject
public org.apache.http.client.HttpClient getObject() throws Exception- Specified by:
getObjectin interfaceFactoryBean<org.apache.http.client.HttpClient>- Throws:
Exception
-
-