Java Doc for CachedResource.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) 


java.lang.Object
   org.w3c.tools.resources.AttributeHolder
      org.w3c.www.protocol.http.cache.CachedResource

All known Subclasses:   org.w3c.www.protocol.http.cache.EntityCachedResource,
CachedResource
abstract public class CachedResource extends AttributeHolder implements TeeMonitor,LRUAble(Code)


Field Summary
protected static  intATTR_CONNEG_HEADERS
     Attribute index - The request headers used for content negotiation as set by the reply Vary header.
protected static  intATTR_CONTENT_ENCODING
    
protected static  intATTR_CONTENT_LANGUAGE
    
protected static  intATTR_CONTENT_LENGTH
     Attribute index - The resource content length.
protected static  intATTR_CONTENT_MD5
    
protected static  intATTR_CURRENT_LENGTH
     Attribute index - The resource current length.
protected static  intATTR_DATE
    
protected static  StringATTR_DESCR
     The minimal attribute set used to describe a cachedresource without loading it entirely.
protected static  intATTR_ETAG
     Attribute index - The entity tag (if any) associated with the resource.
protected static  intATTR_EXTRA_HEADERS
     Attribute index - The extra headers attribute.
protected static  intATTR_FILE
    
protected static  intATTR_IDENTIFIER
    
protected static  intATTR_LOAD_STATE
    
protected static  intATTR_LOCATION
    
protected static  intATTR_REPLY_LAST_MODIFIED
    
protected static  intATTR_STATUS
     Attribute index - The reply status.
protected static  intATTR_VARY
    
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 protected static  StringNAME_CONTENT_LENGTH
     Attribute name - The resource content length.
final protected static  StringNAME_CURRENT_LENGTH
    
final protected static  StringNAME_FILE
    
final protected static  StringNAME_IDENTIFIER
    
final public static  intSTATE_LOAD_COMPLETE
    
final public static  intSTATE_LOAD_ERROR
    
final public static  intSTATE_LOAD_PARTIAL
    
final public static  intSTATE_LOAD_UNKNOWN
     The download state of the resource, unknown, probably an HTTP/1.0 reply without the Content-Length.
final public static  intSTATE_NOT_LOADED
    
protected  ArrayDictionarya
    
 HttpEntityTagetags
    
protected  CacheFilterfilter
    
protected  CacheGenerationgeneration
    
protected  booleaninvalidated
    
protected  LRUAblenext
     LRU management - next entry.
protected  LRUAbleprev
     LRU management - previous entry.
protected  booleanuploading
    


Method Summary
public  longdelete()
     Delete this resource (and its associated file).
public  ArrayDictionarygetConnegHeaders()
     Get the extra headers stored for that resource.
public  String[]getContentEncoding()
     Get the Content-Encoding associated with that cached entry.
public  String[]getContentLanguage()
     Get the Content-Language associated with that cached entry.
public  intgetContentLength()
     Get this cached entry content length.
public  StringgetContentMD5()
     Get the Content-MD5 associated with that cached entry.
abstract public  MimeTypegetContentType()
    
abstract public  intgetCurrentAge()
    
public  intgetCurrentLength()
     Get this cached entry current content length.
public  longgetDate()
    
public  StringgetETag()
     Get the entity tag associated with that cached entry.
public  ArrayDictionarygetExtraHeaders()
     Get the extra headers stored for that resource.
public  FilegetFile()
     Get the cached File.
abstract public  intgetFreshnessLifetime()
    
public  StringgetIdentifier()
    
public  longgetLastModified()
     Get this Cached Resource last modification time.
public  intgetLoadState()
    
public  LRUAblegetNext()
     LRU management - Get next node.
public  LRUAblegetPrev()
     LRU management - Get previous node.
public  intgetStatus()
     Get the HTTP status of that cached entry.
public  String[]getVary()
     Get the Vary associated with that cached entry.
public  booleangetWillRevalidate()
    
public  CachedResourcelookupResource(Request request)
    
public  voidnotifyTeeFailure(int size)
    
public  voidnotifyTeeSuccess(int size)
    
abstract public  Replyperform(Request request)
     This cached entry has been checked valid, perform given request.
Parameters:
  request - The request to perform.
public  voidsetConnegHeaders(ArrayDictionary a)
     Set a new set of extra headers for that resource.
public  voidsetContentEncoding(String[] sum)
     Associate a Content-Encoding with that cached enrty.
public  voidsetContentLanguage(String[] language)
     Associate a Content-Language with that cached enrty.
public  voidsetContentLength(int length)
     Set the content length of that cached entry.
public  voidsetContentMD5(String sum)
     Associate a Content-MD5 with that cached enrty.
abstract public  voidsetContentType(MimeType type)
    
public  voidsetCurrentLength(int length)
     Set the current length of that cached entry.
public  voidsetDate(long date)
     Set the content length of that cached entry.
public  voidsetETag(String etag)
     Associate an entity tag with that cached enrty.
public  voidsetExtraHeaders(ArrayDictionary a)
     Set a new set of extra headers for that resource.
public  voidsetFile(File file)
    
public  voidsetLastModified(long lastmodified)
     Set the last modified time of that cached entry.
public  voidsetLoadState(int state)
    
public synchronized  voidsetNext(LRUAble next)
     LRU management - Set next node.
public synchronized  voidsetPrev(LRUAble prev)
     LRU management - Set previous node.
abstract public  RequestsetRequestRevalidation(Request request)
     This cached entry needs revalidation, it will modify the request to do that.
public  voidsetStatus(int status)
     Set the reply status for that entry.
public  voidsetValue(int idx, Object value)
    
public  voidsetVary(String[] vary)
     Associate a Vary with that cached enrty.
public  voidsetWillRevalidate(boolean invalidated)
    

Field Detail
ATTR_CONNEG_HEADERS
protected static int ATTR_CONNEG_HEADERS(Code)
Attribute index - The request headers used for content negotiation as set by the reply Vary header.



ATTR_CONTENT_ENCODING
protected static int ATTR_CONTENT_ENCODING(Code)
Attribute index - The Content Encoding of the resource



ATTR_CONTENT_LANGUAGE
protected static int ATTR_CONTENT_LANGUAGE(Code)
Attribute index - The Content Language of the resource



ATTR_CONTENT_LENGTH
protected static int ATTR_CONTENT_LENGTH(Code)
Attribute index - The resource content length.



ATTR_CONTENT_MD5
protected static int ATTR_CONTENT_MD5(Code)
Attribute index - The Content MD5 of the resource



ATTR_CURRENT_LENGTH
protected static int ATTR_CURRENT_LENGTH(Code)
Attribute index - The resource current length.



ATTR_DATE
protected static int ATTR_DATE(Code)
Attribute index - The Date of the resource



ATTR_DESCR
protected static String ATTR_DESCR(Code)
The minimal attribute set used to describe a cachedresource without loading it entirely.



ATTR_ETAG
protected static int ATTR_ETAG(Code)
Attribute index - The entity tag (if any) associated with the resource.



ATTR_EXTRA_HEADERS
protected static int ATTR_EXTRA_HEADERS(Code)
Attribute index - The extra headers attribute.



ATTR_FILE
protected static int ATTR_FILE(Code)
Attribute index - The file



ATTR_IDENTIFIER
protected static int ATTR_IDENTIFIER(Code)
Attribute index - The identifier



ATTR_LOAD_STATE
protected static int ATTR_LOAD_STATE(Code)
Attribute index - The download state



ATTR_LOCATION
protected static int ATTR_LOCATION(Code)
Attribute index - The Location of this resource



ATTR_REPLY_LAST_MODIFIED
protected static int ATTR_REPLY_LAST_MODIFIED(Code)
Attribute index - The Last modified of this resource



ATTR_STATUS
protected static int ATTR_STATUS(Code)
Attribute index - The reply status.



ATTR_VARY
protected static int ATTR_VARY(Code)
Attribute index - The Vary of this resource



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.



NAME_CONTENT_LENGTH
final protected static String NAME_CONTENT_LENGTH(Code)
Attribute name - The resource content length.



NAME_CURRENT_LENGTH
final protected static String NAME_CURRENT_LENGTH(Code)
Attribute name - The resource current length



NAME_FILE
final protected static String NAME_FILE(Code)
Attribute name - The identifier



NAME_IDENTIFIER
final protected static String NAME_IDENTIFIER(Code)
Attribute name - The identifier



STATE_LOAD_COMPLETE
final public static int STATE_LOAD_COMPLETE(Code)
The download state of the resource, complete content



STATE_LOAD_ERROR
final public static int STATE_LOAD_ERROR(Code)
The download state of the resource, erroneous, something weird happened! but at least we know that :)



STATE_LOAD_PARTIAL
final public static int STATE_LOAD_PARTIAL(Code)
The download state of the resource, partial content



STATE_LOAD_UNKNOWN
final public static int STATE_LOAD_UNKNOWN(Code)
The download state of the resource, unknown, probably an HTTP/1.0 reply without the Content-Length.



STATE_NOT_LOADED
final public static int STATE_NOT_LOADED(Code)
The download state of the resource, currently not loaded



a
protected ArrayDictionary a(Code)



etags
HttpEntityTag etags(Code)



filter
protected CacheFilter filter(Code)



generation
protected CacheGeneration generation(Code)



invalidated
protected boolean invalidated(Code)



next
protected LRUAble next(Code)
LRU management - next entry.



prev
protected LRUAble prev(Code)
LRU management - previous entry.



uploading
protected boolean uploading(Code)





Method Detail
delete
public long delete()(Code)
Delete this resource (and its associated file). the number of bytes saved.



getConnegHeaders
public ArrayDictionary getConnegHeaders()(Code)
Get the extra headers stored for that resource. An ArrayDictionary with the extra headers, or null if undefined.



getContentEncoding
public String[] getContentEncoding()(Code)
Get the Content-Encoding associated with that cached entry. The String Content-Encoding, or null if undefined.



getContentLanguage
public String[] getContentLanguage()(Code)
Get the Content-Language associated with that cached entry. The String Content-Language, or null if undefined.



getContentLength
public int getContentLength()(Code)
Get this cached entry content length. An integer, giving the content length, or -1if undefined.



getContentMD5
public String getContentMD5()(Code)
Get the Content-MD5 associated with that cached entry. The String encoded Content-MD5, or null if undefined.



getContentType
abstract 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
abstract public int getCurrentAge()(Code)
returns the current age of this cached resource an integer, the current age in seconds



getCurrentLength
public int getCurrentLength()(Code)
Get this cached entry current content length. An integer, giving the current content length, or -1 if undefined



getDate
public long getDate()(Code)
Get this date, as a long a long, the dateif undefined.



getETag
public String getETag()(Code)
Get the entity tag associated with that cached entry. The String encoded entity tag, or null if undefined.



getExtraHeaders
public ArrayDictionary getExtraHeaders()(Code)
Get the extra headers stored for that resource. An ArrayDictionary with the extra headers, or null if undefined.



getFile
public File getFile()(Code)
Get the cached File. a File instance



getFreshnessLifetime
abstract public int getFreshnessLifetime()(Code)
returns the current freshness lifetime of this resource a long, the freshness lifetime, in seconds



getIdentifier
public String getIdentifier()(Code)
Get this cached entry identifier a String, usually the URL of the resource



getLastModified
public long getLastModified()(Code)
Get this Cached Resource last modification time. A long giving the date of the last modification time, or-1 if undefined.



getLoadState
public int getLoadState()(Code)
Get the load state value an integer, as defined in CachedResource
See Also:   org.w3c.www.protocol.http.cache.CachedResource
See Also:   The default is STATE_NOT_LOADED



getNext
public LRUAble getNext()(Code)
LRU management - Get next node. A CvsDirectory instance.



getPrev
public LRUAble getPrev()(Code)
LRU management - Get previous node. A CvsDirectory instance.



getStatus
public int getStatus()(Code)
Get the HTTP status of that cached entry. An integer HTTP status code, or -1 if undefined.



getVary
public String[] getVary()(Code)
Get the Vary associated with that cached entry. The String array of Vary, or null if undefined.



getWillRevalidate
public boolean getWillRevalidate()(Code)
Get state of the resource, did someone ask for revalidation for the next request? a boolean, true if it will.-1 if undefined.



lookupResource
public CachedResource lookupResource(Request request)(Code)
This methods return the CachedResource matching this request it allows lookup in the cache for alternatives a CachedResource depending on the request



notifyTeeFailure
public void notifyTeeFailure(int size)(Code)



notifyTeeSuccess
public void notifyTeeSuccess(int size)(Code)



perform
abstract 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.



setConnegHeaders
public void setConnegHeaders(ArrayDictionary a)(Code)
Set a new set of extra headers for that resource.
Parameters:
  headers - The new set of headers.



setContentEncoding
public void setContentEncoding(String[] sum)(Code)
Associate a Content-Encoding with that cached enrty. sum, the encoding as a string,or nullto reset the value.



setContentLanguage
public void setContentLanguage(String[] language)(Code)
Associate a Content-Language with that cached enrty. sum, the encoding as a string,or nullto reset the value.



setContentLength
public void setContentLength(int length)(Code)
Set the content length of that cached entry.
Parameters:
  length - The new content length of that entry.



setContentMD5
public void setContentMD5(String sum)(Code)
Associate a Content-MD5 with that cached enrty. sum, the md5 sum as a string, see RFC2616, or nullto reset the value.



setContentType
abstract public void setContentType(MimeType type)(Code)
Set the Content-Type of this cached resource
Parameters:
  a - MimeType, the mime type of this resource



setCurrentLength
public void setCurrentLength(int length)(Code)
Set the current length of that cached entry.
Parameters:
  length - The current length of that entry.



setDate
public void setDate(long date)(Code)
Set the content length of that cached entry.
Parameters:
  length - The new content length of that entry.



setETag
public void setETag(String etag)(Code)
Associate an entity tag with that cached enrty.
Parameters:
  etag - The entity tag of the entry, or nullto reset the value.



setExtraHeaders
public void setExtraHeaders(ArrayDictionary a)(Code)
Set a new set of extra headers for that resource.
Parameters:
  headers - The new set of headers.



setFile
public void setFile(File file)(Code)
Set the cached file
Parameters:
  file -



setLastModified
public void setLastModified(long lastmodified)(Code)
Set the last modified time of that cached entry.
Parameters:
  lastmodified - The last modification date as a number of milliseconds since Java epoch, or -1 to undefineprevious setting.



setLoadState
public void setLoadState(int state)(Code)
Set the loading state of this resource
Parameters:
  an - integer, one of the state defined in CachedResource
See Also:   org.w3c.www.protocol.http.cache.CachedResource



setNext
public synchronized void setNext(LRUAble next)(Code)
LRU management - Set next node. A CvsDirectory instance.



setPrev
public synchronized void setPrev(LRUAble prev)(Code)
LRU management - Set previous node. A CvsDirectory instance.



setRequestRevalidation
abstract public Request setRequestRevalidation(Request request)(Code)
This cached entry needs revalidation, it will modify the request to do that.



setStatus
public void setStatus(int status)(Code)
Set the reply status for that entry.
Parameters:
  status - The HTTP status code of that entry, or -1to undefine the previous setting.



setValue
public void setValue(int idx, Object value)(Code)
overrides the default setValue to invalidate the ETag



setVary
public void setVary(String[] vary)(Code)
Associate a Vary with that cached enrty. sum, the header involved in the variant check as a string array,or nullto reset the value.



setWillRevalidate
public void setWillRevalidate(boolean invalidated)(Code)
Set this cached entry revalidate-on-next-request flag validate, a boolean, true if it will be revalidatednext time.



Fields inherited from org.w3c.tools.resources.AttributeHolder
protected Attribute attributes(Code)(Java Doc)
protected Object values(Code)(Java Doc)

Methods inherited from org.w3c.tools.resources.AttributeHolder
public boolean definesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc)
public boolean definesAttribute(String name) throws IllegalAttributeAccess(Code)(Java Doc)
public Attribute[] getAttributes()(Code)(Java Doc)
public boolean getBoolean(int idx, boolean def)(Code)(Java Doc)
public char getChar(int idx, char def)(Code)(Java Doc)
public Object getClone(Object values)(Code)(Java Doc)
public synchronized Object getClone()(Code)(Java Doc)
public synchronized Object getClone(Hashtable defs)(Code)(Java Doc)
public double getDouble(int idx, double def)(Code)(Java Doc)
public float getFloat(int idx, float def)(Code)(Java Doc)
public int getInt(int idx, int def)(Code)(Java Doc)
public long getLong(int idx, long def)(Code)(Java Doc)
public String getString(int idx, String def)(Code)(Java Doc)
public synchronized Object getValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc)
public Object getValue(String name, Object def) throws IllegalAttributeAccess(Code)(Java Doc)
public synchronized void initialize(Object nvalues)(Code)(Java Doc)
public synchronized void initialize(Hashtable defs)(Code)(Java Doc)
public int lookupAttribute(String name)(Code)(Java Doc)
public synchronized void pickleValues(Hashtable defs)(Code)(Java Doc)
public void print(PrintStream out)(Code)(Java Doc)
public void setBoolean(int idx, boolean b)(Code)(Java Doc)
public void setChar(int idx, char ch) throws IllegalAttributeAccess(Code)(Java Doc)
public void setDouble(int idx, double d) throws IllegalAttributeAccess(Code)(Java Doc)
public void setFloat(int idx, float f) throws IllegalAttributeAccess(Code)(Java Doc)
public void setInt(int idx, int i) throws IllegalAttributeAccess(Code)(Java Doc)
public void setLong(int idx, long l) throws IllegalAttributeAccess(Code)(Java Doc)
public void setString(int idx, String s) throws IllegalAttributeAccess(Code)(Java Doc)
public synchronized void setValue(int idx, Object value)(Code)(Java Doc)
public void setValue(String name, Object value)(Code)(Java Doc)
public boolean unsafeDefinesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc)
public double unsafeGetDouble(int idx, double def)(Code)(Java Doc)
public String unsafeGetString(int idx, String def)(Code)(Java Doc)
public Object unsafeGetValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.