Java Doc for EntityCachedResource.java in  » Web-Server » Jigsaw » org » w3c » www » protocol » http » cache » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Server » Jigsaw » org.w3c.www.protocol.http.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
protected static  intATTR_CONTENT_TYPE
    
protected static  intATTR_FRESHNESS_LIFETIME
     Attribute index - The resource's max age.
protected static  intATTR_INITIAL_AGE
     Attribute index - The initial age of this resource.
protected static  intATTR_LOAD_STATE
    
protected static  intATTR_RESPONSE_TIME
    
protected static  intATTR_REVALIDATE
    
final public static  intCOND_FAILED
     Condition check return code - Condition existed but failed.
final public static  intCOND_OK
     Condition check return code - Condition existed and succeeded.
final public static  intCOND_WEAK
     Condition check return code - Condition existed and succeeded but is a weak validation.
protected  CacheFilterfilter
    
protected  booleanhasEntity
    
protected  intoldsize
    
protected  booleanregetting
    
protected  booleanrevalidating
    
protected  intwantedsize
    

Constructor Summary
public  EntityCachedResource(CacheFilter filter, Request req, Reply rep)
    
public  EntityCachedResource()
    

Method Summary
public  intcheckIfMatch(Request request)
     Try to validate an If-Match request.
Parameters:
  request - The request to validate.
public  intcheckIfModifiedSince(Request request)
     Try to validate an If-Modified-Since request.
Parameters:
  request - The request to validate.
public  intcheckIfNoneMatch(Request request)
     Try to validate an If-None-Match request.
Parameters:
  request - The request to validate.
public  intcheckIfUnmodifiedSince(Request request)
     Try to validate an If-Unmodified-Since request.
Parameters:
  request - The request to validate.
public  intcheckValidators(Request request)
    
protected synchronized  voidcleanUpload()
    
public  MimeTypegetContentType()
    
public  intgetCurrentAge()
    
public  intgetFreshnessLifetime()
     Get this resource's freshness lifetime (RFC2616: 13.2.4).
public  HttpEntityTaggetHETag()
    
public  intgetInitialAge()
     Get this cached entry initial age.
public synchronized  InputStreamgetInputStream()
     Get the cached data for that cached entry.
public  longgetResponseTime()
     Get the time of the response used to cached that entry.
public  booleangetRevalidate()
    
protected  ReplyhandleRangeRequest(Request request, HttpRange r)
     handle a range request, according to the first range or the request FIXME we should handle all the ranges at some point...
public  voidinitialize(Object values)
    
public  voidnotifyTeeFailure(int size)
    
public synchronized  voidnotifyTeeSuccess(int size)
    
public  Replyperform(Request request)
     This cached entry has been checked valid, perform given request.
Parameters:
  request - The request to perform.
public  voidsetContentType(MimeType type)
    
public  voidsetFreshnessLifetime(int freshnessLifetime)
     Set this cached entry .
public  voidsetInitialAge(int initage)
     Set this resource's initial age.
protected  ReplysetReplyHeaders(Reply reply)
    
public  RequestsetRequestRevalidation(Request request)
     This cached entry needs revalidation, it will modify the request to do that.
public  voidsetResponseTime(long responsetime)
     Set this cached entry response time.
public  voidsetRevalidate(boolean validate)
     Set this cached entry revalidate flag.
public synchronized  InputStreamtryActiveCacheContent(InputStream in)
     Try using an active stream to cache the content.
protected  voidupdateInfo(Request request, Reply rep)
    
final protected synchronized  voidwaitUpload()
     FIXME Will be replaced soon, so that multiple people may share the same temporary resource.

Field Detail
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.



filter
protected CacheFilter filter(Code)



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)




Constructor Detail
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)




Method Detail
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.



Fields inherited from org.w3c.www.protocol.http.cache.CachedResource
protected static int ATTR_CONNEG_HEADERS(Code)(Java Doc)
protected static int ATTR_CONTENT_ENCODING(Code)(Java Doc)
protected static int ATTR_CONTENT_LANGUAGE(Code)(Java Doc)
protected static int ATTR_CONTENT_LENGTH(Code)(Java Doc)
protected static int ATTR_CONTENT_MD5(Code)(Java Doc)
protected static int ATTR_CURRENT_LENGTH(Code)(Java Doc)
protected static int ATTR_DATE(Code)(Java Doc)
protected static String ATTR_DESCR(Code)(Java Doc)
protected static int ATTR_ETAG(Code)(Java Doc)
protected static int ATTR_EXTRA_HEADERS(Code)(Java Doc)
protected static int ATTR_FILE(Code)(Java Doc)
protected static int ATTR_IDENTIFIER(Code)(Java Doc)
protected static int ATTR_LOAD_STATE(Code)(Java Doc)
protected static int ATTR_LOCATION(Code)(Java Doc)
protected static int ATTR_REPLY_LAST_MODIFIED(Code)(Java Doc)
protected static int ATTR_STATUS(Code)(Java Doc)
protected static int ATTR_VARY(Code)(Java Doc)
final public static int COND_FAILED(Code)(Java Doc)
final public static int COND_OK(Code)(Java Doc)
final protected static String NAME_CONTENT_LENGTH(Code)(Java Doc)
final protected static String NAME_CURRENT_LENGTH(Code)(Java Doc)
final protected static String NAME_FILE(Code)(Java Doc)
final protected static String NAME_IDENTIFIER(Code)(Java Doc)
final public static int STATE_LOAD_COMPLETE(Code)(Java Doc)
final public static int STATE_LOAD_ERROR(Code)(Java Doc)
final public static int STATE_LOAD_PARTIAL(Code)(Java Doc)
final public static int STATE_LOAD_UNKNOWN(Code)(Java Doc)
final public static int STATE_NOT_LOADED(Code)(Java Doc)
protected ArrayDictionary a(Code)(Java Doc)
HttpEntityTag etags(Code)(Java Doc)
protected CacheFilter filter(Code)(Java Doc)
protected CacheGeneration generation(Code)(Java Doc)
protected boolean invalidated(Code)(Java Doc)
protected LRUAble next(Code)(Java Doc)
protected LRUAble prev(Code)(Java Doc)
protected boolean uploading(Code)(Java Doc)

Methods inherited from org.w3c.www.protocol.http.cache.CachedResource
public long delete()(Code)(Java Doc)
public ArrayDictionary getConnegHeaders()(Code)(Java Doc)
public String[] getContentEncoding()(Code)(Java Doc)
public String[] getContentLanguage()(Code)(Java Doc)
public int getContentLength()(Code)(Java Doc)
public String getContentMD5()(Code)(Java Doc)
abstract public MimeType getContentType()(Code)(Java Doc)
abstract public int getCurrentAge()(Code)(Java Doc)
public int getCurrentLength()(Code)(Java Doc)
public long getDate()(Code)(Java Doc)
public String getETag()(Code)(Java Doc)
public ArrayDictionary getExtraHeaders()(Code)(Java Doc)
public File getFile()(Code)(Java Doc)
abstract public int getFreshnessLifetime()(Code)(Java Doc)
public String getIdentifier()(Code)(Java Doc)
public long getLastModified()(Code)(Java Doc)
public int getLoadState()(Code)(Java Doc)
public LRUAble getNext()(Code)(Java Doc)
public LRUAble getPrev()(Code)(Java Doc)
public int getStatus()(Code)(Java Doc)
public String[] getVary()(Code)(Java Doc)
public boolean getWillRevalidate()(Code)(Java Doc)
public CachedResource lookupResource(Request request)(Code)(Java Doc)
public void notifyTeeFailure(int size)(Code)(Java Doc)
public void notifyTeeSuccess(int size)(Code)(Java Doc)
abstract public Reply perform(Request request) throws HttpException(Code)(Java Doc)
public void setConnegHeaders(ArrayDictionary a)(Code)(Java Doc)
public void setContentEncoding(String[] sum)(Code)(Java Doc)
public void setContentLanguage(String[] language)(Code)(Java Doc)
public void setContentLength(int length)(Code)(Java Doc)
public void setContentMD5(String sum)(Code)(Java Doc)
abstract public void setContentType(MimeType type)(Code)(Java Doc)
public void setCurrentLength(int length)(Code)(Java Doc)
public void setDate(long date)(Code)(Java Doc)
public void setETag(String etag)(Code)(Java Doc)
public void setExtraHeaders(ArrayDictionary a)(Code)(Java Doc)
public void setFile(File file)(Code)(Java Doc)
public void setLastModified(long lastmodified)(Code)(Java Doc)
public void setLoadState(int state)(Code)(Java Doc)
public synchronized void setNext(LRUAble next)(Code)(Java Doc)
public synchronized void setPrev(LRUAble prev)(Code)(Java Doc)
abstract public Request setRequestRevalidation(Request request)(Code)(Java Doc)
public void setStatus(int status)(Code)(Java Doc)
public void setValue(int idx, Object value)(Code)(Java Doc)
public void setVary(String[] vary)(Code)(Java Doc)
public void setWillRevalidate(boolean invalidated)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.