| org.w3c.www.protocol.http.cache.CachedResource org.w3c.www.protocol.http.cache.EntityCachedResource
All known Subclasses: org.w3c.www.protocol.http.cache.push.PushEntityCachedResource,
EntityCachedResource | public class EntityCachedResource extends CachedResource (Code) | | A cached resource with an entity
|
ATTR_CONTENT_TYPE | protected static int ATTR_CONTENT_TYPE(Code) | | Attribute index - The Content-Type of the resource
|
ATTR_FRESHNESS_LIFETIME | protected static int ATTR_FRESHNESS_LIFETIME(Code) | | Attribute index - The resource's max age.
|
ATTR_INITIAL_AGE | protected static int ATTR_INITIAL_AGE(Code) | | Attribute index - The initial age of this resource.
|
ATTR_LOAD_STATE | protected static int ATTR_LOAD_STATE(Code) | | Attribute index - The download state
|
ATTR_RESPONSE_TIME | protected static int ATTR_RESPONSE_TIME(Code) | | Attribute index - The response time
|
ATTR_REVALIDATE | protected static int ATTR_REVALIDATE(Code) | | Attribute index - Revalidate flag
|
COND_FAILED | final public static int COND_FAILED(Code) | | Condition check return code - Condition existed but failed.
|
COND_OK | final public static int COND_OK(Code) | | Condition check return code - Condition existed and succeeded.
|
COND_WEAK | final public static int COND_WEAK(Code) | | Condition check return code - Condition existed and succeeded
but is a weak validation.
|
hasEntity | protected boolean hasEntity(Code) | | |
oldsize | protected int oldsize(Code) | | |
regetting | protected boolean regetting(Code) | | |
revalidating | protected boolean revalidating(Code) | | |
wantedsize | protected int wantedsize(Code) | | |
EntityCachedResource | public EntityCachedResource(CacheFilter filter, Request req, Reply rep)(Code) | | A constructor for new resources that will get some data
directly
FIXME params
|
EntityCachedResource | public EntityCachedResource()(Code) | | |
checkIfMatch | public int checkIfMatch(Request request)(Code) | | Try to validate an If-Match request.
Parameters: request - The request to validate. An integer, COND_FAILED , if the condition waschecked, but failed; COND_OK of condition was checkedand succeeded, 0 otherwise. |
checkIfModifiedSince | public int checkIfModifiedSince(Request request)(Code) | | Try to validate an If-Modified-Since request.
Parameters: request - The request to validate. An integer, COND_FAILED , if the condition waschecked, but failed; COND_OK of condition was checkedand succeeded, 0 otherwise. |
checkIfNoneMatch | public int checkIfNoneMatch(Request request)(Code) | | Try to validate an If-None-Match request.
Parameters: request - The request to validate. An integer, COND_FAILED , if the condition waschecked, but failed; COND_OK of condition was checkedand succeeded, 0 otherwise. |
checkIfUnmodifiedSince | public int checkIfUnmodifiedSince(Request request)(Code) | | Try to validate an If-Unmodified-Since request.
Parameters: request - The request to validate. An integer, COND_FAILED , if the condition waschecked, but failed; COND_OK of condition was checkedand succeeded, 0 otherwise. |
checkValidators | public int checkValidators(Request request)(Code) | | check the validators namely LMT/Etags according to rfc2616 rules
An integer, either COND_FAILED if conditionwas checked, but failed, COND_OK if condition was checkedand succeeded, or 0 if the condition was not checkedat all (eg because the resource or the request didn't support it). |
cleanUpload | protected synchronized void cleanUpload()(Code) | | |
getContentType | public MimeType getContentType()(Code) | | Get the Content-Type of the cached resource of null if
there is no mime type (it should NEVER happen!)
a MimeType |
getCurrentAge | public int getCurrentAge()(Code) | | Get the current age of this resource
a long the current age of this resource |
getFreshnessLifetime | public int getFreshnessLifetime()(Code) | | Get this resource's freshness lifetime (RFC2616: 13.2.4).
A long number of seconds for which that entry will remainvalid, or -1 if undefined. |
getHETag | public HttpEntityTag getHETag()(Code) | | Get the entity tag associated with that cached entry
the entity tag or null if undefined |
getInitialAge | public int getInitialAge()(Code) | | Get this cached entry initial age.
A long number of seconds giving the initial ageor -1 if undefined. |
getInputStream | public synchronized InputStream getInputStream() throws IOException(Code) | | Get the cached data for that cached entry.
A non-buffered output stream. |
getResponseTime | public long getResponseTime()(Code) | | Get the time of the response used to cached that entry.
A long number of milliseconds since Java epoch, or -1 if undefined. |
getRevalidate | public boolean getRevalidate()(Code) | | Get the revalidate flag
a boolean, true if the proxy must revalidatestale entries-1 if undefined. |
handleRangeRequest | protected Reply handleRangeRequest(Request request, HttpRange r)(Code) | | handle a range request, according to the first range or the
request FIXME we should handle all the ranges at some point...
|
initialize | public void initialize(Object values)(Code) | | The basic initialization
|
notifyTeeFailure | public void notifyTeeFailure(int size)(Code) | | |
notifyTeeSuccess | public synchronized void notifyTeeSuccess(int size)(Code) | | Called when the tee succeed, it allows you to notify a listener of the
Tee that the download completed succesfully with a specific size
|
perform | public Reply perform(Request request) throws HttpException(Code) | | This cached entry has been checked valid, perform given request.
Parameters: request - The request to perform. An Reply instance. exception: HttpException - If something went wrong. |
setContentType | public void setContentType(MimeType type)(Code) | | Set the Content-Type of this cached resource
Parameters: a - MimeType, the mime type of this resource |
setFreshnessLifetime | public void setFreshnessLifetime(int freshnessLifetime)(Code) | | Set this cached entry . freshness lifetime (RFC2616: 13.2.4).
Parameters: maxage - A number of seconds during which the entry will remain valid, or -1 to undefine previous setting. |
setInitialAge | public void setInitialAge(int initage)(Code) | | Set this resource's initial age.
Parameters: initage - The initial age as a number of secondsor -1 to undefine previous setting. |
setReplyHeaders | protected Reply setReplyHeaders(Reply reply)(Code) | | decorate the reply header with some meta information taken
from the cached resource
a reply, the one we just updated |
setRequestRevalidation | public Request setRequestRevalidation(Request request)(Code) | | This cached entry needs revalidation, it will modify the
request to do that.
|
setResponseTime | public void setResponseTime(long responsetime)(Code) | | Set this cached entry response time.
Parameters: responsetime - A long number of milliseconds indicating the response time relative to Java epoch, or -1 to undefined previous setting. |
setRevalidate | public void setRevalidate(boolean validate)(Code) | | Set this cached entry revalidate flag.
validate, a boolean, true if this entry needsto be revalidated while stale. |
tryActiveCacheContent | public synchronized InputStream tryActiveCacheContent(InputStream in) throws IOException(Code) | | Try using an active stream to cache the content.
Byte size usage is taken care of only at the end of the download
to make sure we get the right sizes (might different from the
advertized ones).
An InputStream instance if active caching was possible,null otherwise. |
updateInfo | protected void updateInfo(Request request, Reply rep)(Code) | | sets some useful information about the entity
Parameters: the - request that requested this entity Parameters: the - reply triggered by this request |
waitUpload | final protected synchronized void waitUpload()(Code) | | FIXME Will be replaced soon, so that multiple people may share
the same temporary resource.
Wait for the upload to finish, if needed.
|
|
|