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

## org.w3c.www.protocol.http.cache
Class SimpleCacheValidator

    java.lang.Object
      |
      +--org.w3c.www.protocol.http.cache.CacheValidator
            |
            +--org.w3c.www.protocol.http.cache.SimpleCacheValidator

public class SimpleCacheValidator
extends CacheValidator

Constructor Summary
`SimpleCacheValidator()`

Method Summary
`boolean` | `checkStaleness(CachedResource cr)` Check if the request is stale or not
`boolean` | `isValid(CachedResource cr, Request request)` Is the currently cached version usable to answer the given request ?
`void` | `revalidateResource(CachedResource cr, Request request, Reply reply)` reset all the ages after a revalidation
`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 org.w3c.www.protocol.http.cache.CacheValidator
`initialize`

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

Constructor Detail

### SimpleCacheValidator

    public SimpleCacheValidator()

Method Detail

### checkStaleness

    public boolean checkStaleness(CachedResource cr)

  Check if the request is stale or not
  Overrides:
    checkStaleness in class CacheValidator
  Returns:
    a boolean, false if the resource is still valid true it if needs a revalidation.

### isValid

    public boolean isValid(CachedResource cr,
                           Request request)

  Is the currently cached version usable to answer the given request ?
  Overrides:
    isValid in class CacheValidator
  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 void updateExpirationInfo(CachedResource cr,
                                     Request request,
                                     Reply reply)

  Update the expiration information on a cached resource, even if it was not used. Note that it is the right place to update also information for other cache behaviour used by the sweeper.
  Overrides:
    updateExpirationInfo in class CacheValidator
  Parameters:
    `cr,` - the CachedResource we are upgrading.
    `request,` - the Request
    `reply,` - the Reply

### revalidateResource

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

  reset all the ages after a revalidation
  Overrides:
    revalidateResource in class CacheValidator
  Parameters:
    `cr,` - the CachedResource we are upgrading.
    `request,` - the Request
    `reply,` - the Reply

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