Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`CacheValidator()`

Method Summary
`abstract boolean` | `checkStaleness(CachedResource cr)` Check if the request is stale or not
`void` | `initialize(CacheFilter filter)` initialize this validator
`abstract boolean` | `isValid(CachedResource cr, Request request)` Is the currently cached version usable to answer the given request ?
`abstract void` | `revalidateResource(CachedResource cr, Request request, Reply reply)` reset all the ages after a revalidation
`abstract void` | `updateExpirationInfo(CachedResource cr, Request request, Reply reply)` Update the expiration information on a cached resource, even if it was not used.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CacheValidator

    public CacheValidator()

Method Detail

### 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.

### revalidateResource

    public abstract void revalidateResource(CachedResource cr,
                                            Request request,
                                            Reply reply)

  reset all the ages after a revalidation

### initialize

    public void initialize(CacheFilter filter)

  initialize this validator

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD