org.w3c.www.protocol.http.cache
Class CacheValidator
java.lang.Object
|
+--org.w3c.www.protocol.http.cache.CacheValidator
- Direct Known Subclasses:
- SimpleCacheValidator
- public abstract class CacheValidator
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CacheValidator
public CacheValidator()
checkStaleness
public abstract boolean checkStaleness(CachedResource cr)
- Check if the request is stale or not
- Returns:
- a boolean, true if the resource is still valid
false it if needs a revalidation.
isValid
public abstract boolean isValid(CachedResource cr,
Request request)
- Is the currently cached version usable to answer the given request ?
- Returns:
- A boolean, true if we are able to generate
a valid answer to this request by the
perform
method,
false otherwise (the resource needs to be refreshed).
updateExpirationInfo
public abstract void updateExpirationInfo(CachedResource cr,
Request request,
Reply reply)
- Update the expiration information on a cached resource, even if it was
not used.
- Parameters:
cr,
- the CachedResource we are upgrading.request,
- the Requestreply,
- the Reply
revalidateResource
public abstract void revalidateResource(CachedResource cr,
Request request,
Reply reply)
- reset all the ages after a revalidation
- Parameters:
cr,
- the CachedResource we are upgrading.request,
- the Requestreply,
- the Reply
initialize
public void initialize(CacheFilter filter)
- initialize this validator