hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vianney Carel (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-983) Missing a constructor in CachingHttpClient, to provide both customized responseCachingPolicy, etc. and maxObjectSize
Date Fri, 20 Aug 2010 13:10:22 GMT
Missing a constructor in CachingHttpClient, to provide both customized responseCachingPolicy,
etc. and maxObjectSize
--------------------------------------------------------------------------------------------------------------------

                 Key: HTTPCLIENT-983
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-983
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: Cache
            Reporter: Vianney Carel
            Priority: Trivial


It would be convenient not to be limited to the DEFAULT_MAX_OBJECT_SIZE_BYTES by adding the
below constructor:

     public CachingHttpClient(HttpClient backend, ResponseCachingPolicy responseCachingPolicy,
            CacheEntryGenerator cacheEntryGenerator, URIExtractor uriExtractor,
            HttpCache<CacheEntry> responseCache, CachedHttpResponseGenerator responseGenerator,
            CacheInvalidator cacheInvalidator, CacheableRequestPolicy cacheableRequestPolicy,
            CachedResponseSuitabilityChecker suitabilityChecker,
            ConditionalRequestBuilder conditionalRequestBuilder, CacheEntryUpdater entryUpdater,
            ResponseProtocolCompliance responseCompliance,
            RequestProtocolCompliance requestCompliance,
            int maxObjectSizeBytes) {
        this.maxObjectSizeBytes = maxObjectSizeBytes;
        this.backend = backend;
        this.responseCachingPolicy = responseCachingPolicy;
        this.cacheEntryGenerator = cacheEntryGenerator;
        this.uriExtractor = uriExtractor;
        this.responseCache = responseCache;
        this.responseGenerator = responseGenerator;
        this.cacheInvalidator = cacheInvalidator;
        this.cacheableRequestPolicy = cacheableRequestPolicy;
        this.suitabilityChecker = suitabilityChecker;
        this.conditionalRequestBuilder = conditionalRequestBuilder;
        this.cacheEntryUpdater = entryUpdater;
        this.responseCompliance = responseCompliance;
        this.requestCompliance = requestCompliance;
        }


... in addition to the existing constructor:

    public CachingHttpClient(HttpClient backend, ResponseCachingPolicy responseCachingPolicy,
                             CacheEntryGenerator cacheEntryGenerator, URIExtractor uriExtractor,
                             HttpCache<CacheEntry> responseCache, CachedHttpResponseGenerator
responseGenerator,
                             CacheInvalidator cacheInvalidator, CacheableRequestPolicy cacheableRequestPolicy,
                             CachedResponseSuitabilityChecker suitabilityChecker,
                             ConditionalRequestBuilder conditionalRequestBuilder, CacheEntryUpdater
entryUpdater,
                             ResponseProtocolCompliance responseCompliance,
                             RequestProtocolCompliance requestCompliance) {
        this.maxObjectSizeBytes = DEFAULT_MAX_OBJECT_SIZE_BYTES;
        this.backend = backend;
        this.responseCachingPolicy = responseCachingPolicy;
        this.cacheEntryGenerator = cacheEntryGenerator;
        this.uriExtractor = uriExtractor;
        this.responseCache = responseCache;
        this.responseGenerator = responseGenerator;
        this.cacheInvalidator = cacheInvalidator;
        this.cacheableRequestPolicy = cacheableRequestPolicy;
        this.suitabilityChecker = suitabilityChecker;
        this.conditionalRequestBuilder = conditionalRequestBuilder;
        this.cacheEntryUpdater = entryUpdater;
        this.responseCompliance = responseCompliance;
        this.requestCompliance = requestCompliance;
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message