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 of
InMemoryCachingHttpClientBuilder
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Singleton flag.private 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
Modifier and TypeMethodDescriptionorg.apache.http.client.HttpClient
Class<org.apache.http.client.HttpClient>
boolean
void
setSingleton
(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
-
Field Details
-
singleton
private boolean singletonSingleton flag. -
singletonInstance
@Nullable private org.apache.http.client.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:
isSingleton
in interfaceFactoryBean<org.apache.http.client.HttpClient>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<org.apache.http.client.HttpClient>
-
getObject
- Specified by:
getObject
in interfaceFactoryBean<org.apache.http.client.HttpClient>
- Throws:
Exception
-