Java Doc for RenderResponse.java in  » Portal » Open-Portal » javax » portlet » 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 » Portal » Open Portal » javax.portlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.portlet.RenderResponse

All known Subclasses:   com.sun.portal.portlet.impl.RenderResponseImpl,
RenderResponse
public interface RenderResponse extends PortletResponse(Code)
The RenderResponse defines an object to assist a portlet in sending a response to the portal. It extends the PortletResponse interface to provide specific render response functionality to portlets.
The portlet container creates a RenderResponse object and passes it as argument to the portlet's render method.
See Also:   RenderRequest
See Also:   PortletResponse


Field Summary
final public static  StringEXPIRATION_CACHE
     Property to set the expiration time in seconds for this response using the setProperty method.


Method Summary
public  PortletURLcreateActionURL()
     Creates a portlet URL targeting the portlet.
public  PortletURLcreateRenderURL()
     Creates a portlet URL targeting the portlet.
public  voidflushBuffer()
     Forces any content in the buffer to be written to the client.
public  intgetBufferSize()
     Returns the actual buffer size used for the response.
public  StringgetCharacterEncoding()
     Returns the name of the charset used for the MIME body sent in this response.
public  StringgetContentType()
     Returns the MIME type that can be used to contribute markup to the render response.
public  java.util.LocalegetLocale()
     Returns the locale assigned to the response.
public  StringgetNamespace()
     The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the portal page.
public  java.io.OutputStreamgetPortletOutputStream()
     Returns a OutputStream suitable for writing binary data in the response.
public  java.io.PrintWritergetWriter()
     Returns a PrintWriter object that can send character text to the portal.
public  booleanisCommitted()
     Returns a boolean indicating if the response has been committed.
public  voidreset()
     Clears any data that exists in the buffer as well as the properties set.
public  voidresetBuffer()
     Clears the content of the underlying buffer in the response without clearing properties set.
public  voidsetBufferSize(int size)
     Sets the preferred buffer size for the body of the response.
public  voidsetContentType(String type)
     Sets the MIME type for the render response.
public  voidsetTitle(String title)
     This method sets the title of the portlet.

Field Detail
EXPIRATION_CACHE
final public static String EXPIRATION_CACHE(Code)
Property to set the expiration time in seconds for this response using the setProperty method.

If the expiration value is set to 0, caching is disabled for this portlet; if the value is set to -1, the cache does not expire.

The value is "portlet.expiration-cache".






Method Detail
createActionURL
public PortletURL createActionURL()(Code)
Creates a portlet URL targeting the portlet. If no portlet mode, window state or security modifier is set in the PortletURL the current values are preserved. If a request is triggered by the PortletURL, it results in an action request.

The returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states.

The created URL will per default not contain any parameters of the current render request. a portlet action URL




createRenderURL
public PortletURL createRenderURL()(Code)
Creates a portlet URL targeting the portlet. If no portlet mode, window state or security modifier is set in the PortletURL the current values are preserved. If a request is triggered by the PortletURL, it results in a render request.

The returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states.

The created URL will per default not contain any parameters of the current render request. a portlet render URL




flushBuffer
public void flushBuffer() throws java.io.IOException(Code)
Forces any content in the buffer to be written to the client. A call to this method automatically commits the response.
exception:
  java.io.IOException - if an error occured when writing the output
See Also:   RenderResponse.setBufferSize
See Also:   RenderResponse.getBufferSize
See Also:   RenderResponse.isCommitted
See Also:   RenderResponse.reset



getBufferSize
public int getBufferSize()(Code)
Returns the actual buffer size used for the response. If no buffering is used, this method returns 0. the actual buffer size used
See Also:   RenderResponse.setBufferSize
See Also:   RenderResponse.flushBuffer
See Also:   RenderResponse.isCommitted
See Also:   RenderResponse.reset



getCharacterEncoding
public String getCharacterEncoding()(Code)
Returns the name of the charset used for the MIME body sent in this response.

See RFC 2047 for more information about character encoding and MIME. a String specifying thename of the charset, forexample, ISO-8859-1




getContentType
public String getContentType()(Code)
Returns the MIME type that can be used to contribute markup to the render response.

If no content type was set previously using the RenderResponse.setContentType method this method retuns null.
See Also:   RenderResponse.setContentType the MIME type of the response, or nullif no content type is set




getLocale
public java.util.Locale getLocale()(Code)
Returns the locale assigned to the response. Locale of this response



getNamespace
public String getNamespace()(Code)
The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the portal page. the namespace



getPortletOutputStream
public java.io.OutputStream getPortletOutputStream() throws java.io.IOException(Code)
Returns a OutputStream suitable for writing binary data in the response. The portlet container does not encode the binary data.

Before calling this method the content type of the render response must be set using the RenderResponse.setContentType method.

Calling flush() on the OutputStream commits the response.

Either this method or RenderResponse.getWriter may be called to write the body, not both. a OutputStream for writing binary data
exception:
  java.lang.IllegalStateException - if the getWriter methodhas been called on this response, orif no content type was set using thesetContentType method.
exception:
  java.io.IOException - if an input or output exception occurred
See Also:   RenderResponse.setContentType
See Also:   RenderResponse.getWriter




getWriter
public java.io.PrintWriter getWriter() throws java.io.IOException(Code)
Returns a PrintWriter object that can send character text to the portal.

Before calling this method the content type of the render response must be set using the RenderResponse.setContentType method.

Either this method or RenderResponse.getPortletOutputStream may be called to write the body, not both. a PrintWriter object that can return character data to the portal
exception:
  java.io.IOException - if an input or output exception occurred
exception:
  java.lang.IllegalStateException - if the getPortletOutputStream methodhas been called on this response, or if no content type was set using thesetContentType method.
See Also:   RenderResponse.setContentType
See Also:   RenderResponse.getPortletOutputStream




isCommitted
public boolean isCommitted()(Code)
Returns a boolean indicating if the response has been committed. a boolean indicating if the response has beencommitted
See Also:   RenderResponse.setBufferSize
See Also:   RenderResponse.getBufferSize
See Also:   RenderResponse.flushBuffer
See Also:   RenderResponse.reset



reset
public void reset()(Code)
Clears any data that exists in the buffer as well as the properties set. If the response has been committed, this method throws an IllegalStateException.
exception:
  java.lang.IllegalStateException - if the response has already beencommitted
See Also:   RenderResponse.setBufferSize
See Also:   RenderResponse.getBufferSize
See Also:   RenderResponse.flushBuffer
See Also:   RenderResponse.isCommitted



resetBuffer
public void resetBuffer()(Code)
Clears the content of the underlying buffer in the response without clearing properties set. If the response has been committed, this method throws an IllegalStateException.
exception:
  IllegalStateException - if this method is called afterresponse is comitted
See Also:   RenderResponse.setBufferSize
See Also:   RenderResponse.getBufferSize
See Also:   RenderResponse.isCommitted
See Also:   RenderResponse.reset



setBufferSize
public void setBufferSize(int size)(Code)
Sets the preferred buffer size for the body of the response. The portlet container will use a buffer at least as large as the size requested.

This method must be called before any response body content is written; if content has been written, or the portlet container does not support buffering, this method may throw an IllegalStateException.
Parameters:
  size - the preferred buffer size
exception:
  java.lang.IllegalStateException - if this method is called aftercontent has been written, or theportlet container does not support buffering
See Also:   RenderResponse.getBufferSize
See Also:   RenderResponse.flushBuffer
See Also:   RenderResponse.isCommitted
See Also:   RenderResponse.reset




setContentType
public void setContentType(String type)(Code)
Sets the MIME type for the render response. The portlet must set the content type before calling RenderResponse.getWriter or RenderResponse.getPortletOutputStream .

Calling setContentType after getWriter or getOutputStream does not change the content type.
Parameters:
  type - the content MIME type
throws:
  java.lang.IllegalArgumentException - if the given type is not in the list returnedby PortletRequest.getResponseContentTypes
See Also:   RenderRequest.getResponseContentTypes
See Also:   RenderResponse.getContentType




setTitle
public void setTitle(String title)(Code)
This method sets the title of the portlet.

The value can be a text String
Parameters:
  title - portlet title as text String or resource URI




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