Module net.shibboleth.ext.spring
Class InMemoryCachingHttpClientFactoryBean
- java.lang.Object
-
- net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder
-
- net.shibboleth.utilities.java.support.httpclient.InMemoryCachingHttpClientBuilder
-
- net.shibboleth.ext.spring.factory.InMemoryCachingHttpClientFactoryBean
-
- All Implemented Interfaces:
FactoryBean<org.apache.http.client.HttpClient>
public class InMemoryCachingHttpClientFactoryBean extends InMemoryCachingHttpClientBuilder implements FactoryBean<org.apache.http.client.HttpClient>
Factory bean version ofInMemoryCachingHttpClientBuilder.
-
-
Field Summary
Fields Modifier and Type Field Description private booleansingletonSingleton flag.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 InMemoryCachingHttpClientFactoryBean()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.client.HttpClientgetObject()Class<org.apache.http.client.HttpClient>getObjectType()booleanisSingleton()voidsetSingleton(boolean flag)Set if a singleton should be created, or a new object on each request otherwise.-
Methods inherited from class net.shibboleth.utilities.java.support.httpclient.InMemoryCachingHttpClientBuilder
decorateApacheBuilder, getMaxCacheEntries, getMaxCacheEntrySize, setMaxCacheEntries, setMaxCacheEntrySize
-
Methods inherited from class net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder
buildClient, 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
-
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.http.client.HttpClient>
-
getObjectType
public Class<org.apache.http.client.HttpClient> getObjectType()
- Specified by:
getObjectTypein interfaceFactoryBean<org.apache.http.client.HttpClient>
-
getObject
public org.apache.http.client.HttpClient getObject() throws Exception- Specified by:
getObjectin interfaceFactoryBean<org.apache.http.client.HttpClient>- Throws:
Exception
-
-