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

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

@Immutable
public class CacheEntryUpdater
extends Object

Update a CacheEntry with new or updated information based on the latest 200 or 304 status responses from the Server. Use the HttpResponse to perform the update.

Since:
4.1

Constructor Summary
CacheEntryUpdater()
           
 
Method Summary
protected  Header[] mergeHeaders(CacheEntry entry, HttpResponse response)
           
 CacheEntry updateCacheEntry(CacheEntry entry, Date requestDate, Date responseDate, HttpResponse response)
          Update the entry with the new information from the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheEntryUpdater

public CacheEntryUpdater()
Method Detail

updateCacheEntry

public CacheEntry updateCacheEntry(CacheEntry entry,
                                   Date requestDate,
                                   Date responseDate,
                                   HttpResponse response)
                            throws IOException
Update the entry with the new information from the response.

Parameters:
entry - The cache Entry to be updated
requestDate - When the request was performed
responseDate - When the response was gotten
response - The HttpResponse from the backend server call
Returns:
CacheEntry an updated version of the cache entry
Throws:
IOException - if something bad happens while trying to read the body from the original entry

mergeHeaders

protected Header[] mergeHeaders(CacheEntry entry,
                                HttpResponse response)


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