    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.www.protocol.http.cache.VaryResource

    java.lang.Object
       |
       +----w3c.jigsaw.resources.AttributeHolder
               |
               +----w3c.jigsaw.resources.Resource
                       |
                       +----w3c.www.protocol.http.cache.CachedResource
                               |
                               +----w3c.www.protocol.http.cache.VaryResource

public class VaryResource
extends CachedResource

##

ATTR_VARIANT_LOCATIONS
  Attribute index - The location of the variants.
ATTR_VARY
  Attribute index - The dimension on which this resource varies.
variants
  The loaded list of cached variants.

##

VaryResource()

##

addVariant(CachedResource)
getVariant(HttpEntityTag)
getVariantLocations()
  Get this varying resource cached variant locations.
getVariants()
getVariantsETag()
getVary()
  Get the dimension on which this resource varies.
isValid(Request)
  Is the currently cached version usable to answer the given request ?
setRequestValidation(Request)
  Update an original request for a revalidation.
updateVariant(Request, Reply)
validate(Request, Reply)
  Given an HTTP transaction, validate that cached entry.

##

ATTR_VARIANT_LOCATIONS

      protected static int ATTR_VARIANT_LOCATIONS

  Attribute index - The location of the variants.

ATTR_VARY

      protected static int ATTR_VARY

  Attribute index - The dimension on which this resource varies.

variants

      protected CachedResource variants[]

  The loaded list of cached variants.

##

VaryResource

      public VaryResource()

##

getVariantLocations

      public synchronized String[] getVariantLocations()

  Get this varying resource cached variant locations.
  Returns:
    A array of URL encoded as String a String array, or null if no variants have been cached yet.

getVary

      public String[] getVary()

  Get the dimension on which this resource varies.
  Returns:
    A list of HTTP header field names. This method will never return null since this would prevent it from being cached.

addVariant

      public synchronized void addVariant(CachedResource v)

getVariants

      public synchronized CachedResource[] getVariants()

getVariantsETag

      public synchronized HttpEntityTag[] getVariantsETag()

getVariant

      public synchronized CachedResource getVariant(HttpEntityTag etag)

updateVariant

      public Reply updateVariant(Request request,
                                 Reply reply) throws IOException

setRequestValidation

      public void setRequestValidation(Request request)

  Update an original request for a revalidation.
  Overrides:
    setRequestValidation in class CachedResource

isValid

      public boolean isValid(Request request)

  Is the currently cached version usable to answer the given request ?
  Overrides:
    isValid in class CachedResource

validate

      public synchronized Reply validate(Request request,
                                         Reply reply) throws IOException

  Given an HTTP transaction, validate that cached entry.
  Overrides:
    validate in class CachedResource

    All Packages  Class Hierarchy  This Package  Previous  Next  Index