public class FileCachingHttpClientFactoryBean extends HttpClientFactoryBean implements DisposableBean
FileCachingHttpClientBuilder
and to then emit a HttpClient.| Modifier and Type | Field and Description |
|---|---|
private List<HttpClient> |
clientRefs
List of HttpClients produced by this factory, used to invoke their destroy()
when this factory instances is destroy()-ed.
|
logger| Constructor and Description |
|---|
FileCachingHttpClientFactoryBean()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder |
createHttpClientBuilder()
Create and return the instance of
HttpClientBuilder to use. |
protected HttpClient |
doCreateInstance()
Call the parent class to create the instance.
|
void |
setCacheDirectory(String cacheDirectory)
Set the cache directory path.
|
void |
setMaxCacheEntries(int maxCacheEntries)
Set the maximum number of cached responses.
|
void |
setMaxCacheEntrySize(long maxCacheEntrySize)
Set the maximum response body size, in bytes, that will be eligible for caching.
|
getHttpClientBuilder, getObjectType, setConnectionDisregardTLSCertificate, setConnectionProxyHost, setConnectionProxyPassword, setConnectionProxyPort, setConnectionProxyUsername, setConnectionRequestTimeout, setConnectionTimeout, setMaxConnectionsPerRoute, setMaxConnectionsTotal, setSocketTimeout, setTLSSocketFactory, setUserAgentcreateInstance, destroyInstanceafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroyprivate List<HttpClient> clientRefs
public FileCachingHttpClientFactoryBean()
public void setCacheDirectory(String cacheDirectory)
cacheDirectory - The cacheDirectory to set.public void setMaxCacheEntries(int maxCacheEntries)
maxCacheEntries - The maxCacheEntries to set.public void setMaxCacheEntrySize(long maxCacheEntrySize)
maxCacheEntrySize - The maxCacheEntrySize to set.protected net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder createHttpClientBuilder()
HttpClientBuilder to use.
Subclasses may override to build a specialized subclass.createHttpClientBuilder in class HttpClientFactoryBeanprotected HttpClient doCreateInstance() throws Exception
doCreateInstance in class HttpClientFactoryBeanException - if needed.Copyright © 1999–2016 Shibboleth Consortium. All rights reserved.