Java Doc for Cache.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » portal » generic » 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 » EJB Server resin 3.1.5 » resin » com.caucho.portal.generic 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.portal.generic.Cache

Cache
abstract public class Cache (Code)


Field Summary
final protected static  Loggerlog
    


Method Summary
abstract public  voidfinishCaching(Writer writer, int expirationCache, CacheKey cacheKey, String encoding, Map<String, Object> cachePropertiesMap, Map<String, Object> propertiesMap, Map<String, String> requestAttributeMap)
     Finish with a Writer previously returned by Cache.startCachingWriter .
abstract public  voidfinishCaching(OutputStream outputStream, int expirationCache, CacheKey cacheKey, Map<String, Object> cachePropertiesMap, Map<String, Object> propertiesMap, Map<String, String> requestAttributeMap)
     Finish with an OutputStream previously returned by Cache.startCachingOutputStream .
abstract public  OutputStreamgetCachingOutputStream(String namespace, int expirationCache, boolean isPrivate)
     Called immediately before a Portlet is rendered to give the Cache an opportunity to cache the response. If the response can be cached, the implementation returns an OutputStream that receives the response. When the response is completed, finishCaching(OutputStream) will be called. If the response cannot be cached, the implementation returns null. At this point, the expirationCache is a best guess and the real value passed to finishCaching() may be different.
Parameters:
  window - the portlet window for the portlet about tobe rendered
Parameters:
  namespace - the namespace for the portlet about to be rendered
Parameters:
  expirationCache - a best guess at the expiration period in seconds, -1 if unlimited an OutputStream that intercepts the content and then writes toresponse.getOutputStream(), or null if the response cannot be cached.
abstract public  WritergetCachingWriter(String namespace, int expirationCache, boolean isPrivate)
     Called to give the Cache an opportunity to cache the response. If the response can be cached, the implementation returns a Writer that receives the response. When the response is completed, finishCaching(Writer) will be called. If the response cannot be cached, the implementation returns null. At this point, the expirationCache is a best guess and the real value passed to finishCaching() may be different.
Parameters:
  window - the portlet configuration for the portlet about tobe rendered
Parameters:
  namespace - the namespace for the portlet about to be rendered
Parameters:
  expirationCache - a best guess at the expiration period in seconds, -1 if unlimited a Writer that intercepts the content and then writes toresponse.getWriter(), or null if the response cannot be cached.
abstract public  intrespondFromCache(CacheKey cacheKey, RenderRequest request, RenderResponse response)
     Send a response from the cache, or return false if there is no response from the cache. The passed cacheKey can be manipulated by the cache without side-effects, but the cache cannot take ownership of the cacheKey because it may be pooled by the caller. Binary responses should be sent to the OutputStream obtained with response.getOutputStream(). Textual response should be sent to the PrintWriter obtained with response.getWriter(). response.setCharacterEncoding() should be used before getWriter() to set the character encoding to the character encoding that was in use when the response was cached. If isPrivate is true, then cacheKey.getRequestedSessionId() will have a non-null value.

Field Detail
log
final protected static Logger log(Code)





Method Detail
finishCaching
abstract public void finishCaching(Writer writer, int expirationCache, CacheKey cacheKey, String encoding, Map<String, Object> cachePropertiesMap, Map<String, Object> propertiesMap, Map<String, String> requestAttributeMap)(Code)
Finish with a Writer previously returned by Cache.startCachingWriter . If the expirationCache is 0 or the cacheKey is null, the cached response must be discarded.
Parameters:
  writer - the writer returned from Cache.startCachingWriter
Parameters:
  expirationCache - the updated expirationCache, this may the samevalue received in Cache.startWriter, a new value set bythe portlet while it rendered itself, or 0 if the cache must bediscarded.
Parameters:
  cacheKey - the CacheKey that uniquely differentiates this response from other responses
Parameters:
  encoding - the encoding for the Writer, the cache needs to callresponse.setEncoding(encoding) if it later responds in respondFromCache().
Parameters:
  cachePropertiesMap - a map of properties that begin with "Cache-",these may be directives to the cache or may be keys and values that shoulddistinguish the uniqueness of the Cached value beyond the uniquenessestablished by CacheKey, depending on the portal implementation. These properties should be recreated during respondFromCache().If the value is a String, setProperty is used. If the value isan ArrayList, add property is used.
Parameters:
  propertiesMap - a map of properties that the Cache must recreatewhen the cached response is used in a susbsequent call to respondFromCacheIf the value is a String, setProperty is used. If the value isan ArrayList, add property is used.
Parameters:
  requestAttributesMap - a map of request attributes that the Cachemust recreate when the cached response is used in a susbsequent call torespondFromCache



finishCaching
abstract public void finishCaching(OutputStream outputStream, int expirationCache, CacheKey cacheKey, Map<String, Object> cachePropertiesMap, Map<String, Object> propertiesMap, Map<String, String> requestAttributeMap)(Code)
Finish with an OutputStream previously returned by Cache.startCachingOutputStream . If the cacheKey is null or the expirationCache is 0, the cached response must be discarded.



getCachingOutputStream
abstract public OutputStream getCachingOutputStream(String namespace, int expirationCache, boolean isPrivate) throws IOException(Code)
Called immediately before a Portlet is rendered to give the Cache an opportunity to cache the response. If the response can be cached, the implementation returns an OutputStream that receives the response. When the response is completed, finishCaching(OutputStream) will be called. If the response cannot be cached, the implementation returns null. At this point, the expirationCache is a best guess and the real value passed to finishCaching() may be different.
Parameters:
  window - the portlet window for the portlet about tobe rendered
Parameters:
  namespace - the namespace for the portlet about to be rendered
Parameters:
  expirationCache - a best guess at the expiration period in seconds, -1 if unlimited an OutputStream that intercepts the content and then writes toresponse.getOutputStream(), or null if the response cannot be cached.



getCachingWriter
abstract public Writer getCachingWriter(String namespace, int expirationCache, boolean isPrivate) throws IOException(Code)
Called to give the Cache an opportunity to cache the response. If the response can be cached, the implementation returns a Writer that receives the response. When the response is completed, finishCaching(Writer) will be called. If the response cannot be cached, the implementation returns null. At this point, the expirationCache is a best guess and the real value passed to finishCaching() may be different.
Parameters:
  window - the portlet configuration for the portlet about tobe rendered
Parameters:
  namespace - the namespace for the portlet about to be rendered
Parameters:
  expirationCache - a best guess at the expiration period in seconds, -1 if unlimited a Writer that intercepts the content and then writes toresponse.getWriter(), or null if the response cannot be cached.



respondFromCache
abstract public int respondFromCache(CacheKey cacheKey, RenderRequest request, RenderResponse response)(Code)
Send a response from the cache, or return false if there is no response from the cache. The passed cacheKey can be manipulated by the cache without side-effects, but the cache cannot take ownership of the cacheKey because it may be pooled by the caller. Binary responses should be sent to the OutputStream obtained with response.getOutputStream(). Textual response should be sent to the PrintWriter obtained with response.getWriter(). response.setCharacterEncoding() should be used before getWriter() to set the character encoding to the character encoding that was in use when the response was cached. If isPrivate is true, then cacheKey.getRequestedSessionId() will have a non-null value. A cache should first perform a lookup with the CacheKey as provided. If that fails, it should call cacheKey.setLocale(null) and try again. The cache should also check the value of cacheKey.getContentType(). If the contentType is null, the cache can respond if it has an entry that matches for one contentType. If a match is found, the cache sets the contentType with connection.setContentType(). 0 if no response was written from the cache, otherwise the number of seconds that a response written from the cache is good for or -1if the cached reponse is good forever



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.