org.apache.http.impl.client.cache
Class ConditionalRequestBuilder

java.lang.Object
  extended by org.apache.http.impl.client.cache.ConditionalRequestBuilder

@Immutable
public class ConditionalRequestBuilder
extends Object

Since:
4.1

Constructor Summary
ConditionalRequestBuilder()
           
 
Method Summary
 HttpRequest buildConditionalRequest(HttpRequest request, CacheEntry cacheEntry)
          When a CacheEntry is stale but 'might' be used as a response to an HttpRequest we will attempt to revalidate the entry with the origin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalRequestBuilder

public ConditionalRequestBuilder()
Method Detail

buildConditionalRequest

public HttpRequest buildConditionalRequest(HttpRequest request,
                                           CacheEntry cacheEntry)
                                    throws ProtocolException
When a CacheEntry is stale but 'might' be used as a response to an HttpRequest we will attempt to revalidate the entry with the origin. Build the origin HttpRequest here and return it.

Parameters:
request - the original request from the caller
cacheEntry - the entry that needs to be revalidated
Returns:
the wrapped request
Throws:
ProtocolException - when I am unable to build a new origin request.


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.