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

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

public class VaryResource
extends CachedResource

Field Summary
`protected static int` | `ATTR_VARIANT_LOCATIONS` Attribute index - The location of the variants.
`protected static int` | `ATTR_VARY` Attribute index - The dimension on which this resource varies.
`protected CachedResource[]` | `variants` The loaded list of cached variants.

Fields inherited from class org.w3c.www.protocol.http.cache.CachedResource
`ATTR_CACHE_FILTER, ATTR_CONTENT_LENGTH, ATTR_CONTENT_TYPE, ATTR_DATE, ATTR_ETAG, ATTR_EXTRA_HEADERS, ATTR_FILE, ATTR_GENERATION, ATTR_INITAGE, ATTR_LAST_MODIFIED, ATTR_MAXAGE, ATTR_RESOURCE_STORE, ATTR_RESPONSE_TIME, ATTR_REVALIDATE, ATTR_STATUS, COND_FAILED, COND_OK, DEFAULT_MAXAGE`

Fields inherited from class org.w3c.tools.resources.Resource
`ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL`

Fields inherited from class org.w3c.tools.resources.AttributeHolder
`attributes, slowpickle, values`

Constructor Summary
`VaryResource()`

Method Summary
`void` | `addVariant(CachedResource v)`
`void` | `delete()` Delete this cached entry from the cache.
`CachedResource` | `getVariant(HttpEntityTag etag)`
`java.lang.String[]` | `getVariantLocations()` Get this varying resource cached variant locations.
`CachedResource[]` | `getVariants()`
`HttpEntityTag[]` | `getVariantsETag()`
`java.lang.String[]` | `getVary()` Get the dimension on which this resource varies.
`boolean` | `isValid(Request request)`
`void` | `setRequestValidation(Request request)`
`Reply` | `updateVariant(Request request, Reply reply)`
`Reply` | `validate(Request request, Reply reply)`

Methods inherited from class org.w3c.www.protocol.http.cache.CachedResource

`cacheContent, checkIfMatch, checkIfModifiedSince, checkIfNoneMatch, checkIfUnmodifiedSince, cleanUpload, computeCurrentAge, getContentLength, getContentType, getDate, getETag, getExtraHeaders, getFile, getGeneration, getHETag, getInitialAge, getInputStream, getLastModified, getMaxAge, getResourceStore, getResponseTime, getRevalidate, getStatus, handleRangeRequest, initialize, initialize, isShared, notifyTeeFailure, notifyTeeSuccess, notifyUploading, perform, setContentLength, setContentType, setDate, setDefaultMaxAge, setETag, setExtraHeaders, setFile, setGeneration, setInitialAge, setLastModified, setMaxAge, setReplyHeaders, setResourceHeaders, setResponseTime, setRevalidate, setStatus, setValue, tryActiveCacheContent, updateAges, waitUpload`

Methods inherited from class org.w3c.tools.resources.Resource
`acceptUnload, checkMultipleLock, collectFrames, getClone, getContext, getFrame, getFrames, getHelpURL, getHelpURL, getIdentifier, getParent, getResourceReference, getServer, getSpace, getSpaceEntry, getStoreEntry, getURLPath, getValue, getValue, isInitialized, markModified, notifyUnload, registerFrame, setContext, setContext, setValue, unregisterFrame, updateAttributes`

Methods inherited from class org.w3c.tools.resources.AttributeHolder
`definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, initialize, lookupAttribute, pickle, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unpickle, unpickle, unpickle, unpickleInstance, unpickleInstance`

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

Field Detail

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

Constructor Detail

### VaryResource

    public VaryResource()

Method Detail

### getVariantLocations

    public java.lang.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 java.lang.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 void addVariant(CachedResource v)

### getVariants

    public CachedResource[] getVariants()

### getVariantsETag

    public HttpEntityTag[] getVariantsETag()

### getVariant

    public CachedResource getVariant(HttpEntityTag etag)

### updateVariant

    public Reply updateVariant(Request request,
                               Reply reply)
                        throws java.io.IOException

### setRequestValidation

    public void setRequestValidation(Request request)

  Overrides:
    setRequestValidation in class CachedResource

### isValid

    public boolean isValid(Request request)

  Overrides:
    isValid in class CachedResource

### validate

    public Reply validate(Request request,
                          Reply reply)
                   throws java.io.IOException

  Overrides:
    validate in class CachedResource

### delete

    public void delete()

  Delete this cached entry from the cache.
  Overrides:
    delete in class CachedResource