org.apache.http.impl.client.cache
Class CacheEntryUpdater
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheEntryUpdater
public CacheEntryUpdater()
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 updatedrequestDate
- When the request was performedresponseDate
- When the response was gottenresponse
- 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.