Class 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 Detail

      • singletonInstance

        @Nullable
        private org.apache.http.client.HttpClient singletonInstance
        Our captive client in singleton cases.
    • Constructor Detail

      • FileCachingHttpClientFactoryBean

        public FileCachingHttpClientFactoryBean()
    • Method Detail

      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface FactoryBean<org.apache.http.client.HttpClient>
      • getObjectType

        public Class<org.apache.http.client.HttpClient> getObjectType()
        Specified by:
        getObjectType in interface FactoryBean<org.apache.http.client.HttpClient>