org.apache.cocoon.environment.portlet
Class RenderResponse

java.lang.Object
  extended by org.apache.cocoon.environment.portlet.PortletResponse
      extended by org.apache.cocoon.environment.portlet.RenderResponse
All Implemented Interfaces:
Response

public final class RenderResponse
extends PortletResponse

Implements the Response interface for the JSR-168 (Portlet) environment.

Version:
CVS $Id: RenderResponse.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Alex Rudnev, Vadim Gritsenko

Constructor Summary
protected RenderResponse(javax.portlet.RenderResponse response, javax.portlet.PortletPreferences preferences)
          Creates a RenderResponse based on a real RenderResponse object
 
Method Summary
 void addHeader(String name, String value)
          Adds a response header with the given name and value.
 javax.portlet.PortletURL createActionURL()
           
 javax.portlet.PortletURL createRenderURL()
           
 void flushBuffer()
           
 int getBufferSize()
           
 String getCharacterEncoding()
          Returns the name of the charset used for the MIME body sent in this response.
 String getContentType()
           
 Locale getLocale()
          Returns the locale assigned to the response.
 String getNamespace()
           
 OutputStream getPortletOutputStream()
           
 javax.portlet.RenderResponse getRenderResponse()
          Type cast portletResponse to RenderResponse
 PrintWriter getWriter()
           
 boolean isCommitted()
           
 void reset()
           
 void resetBuffer()
           
 void setBufferSize(int size)
           
 void setContentType(String type)
           
 void setHeader(String name, String value)
          Sets a response header with the given name and value.
 void setTitle(String title)
           
 
Methods inherited from class org.apache.cocoon.environment.portlet.PortletResponse
addCookie, addDateHeader, addIntHeader, addProperty, containsHeader, createCookie, encodeURL, getPortletResponse, setDateHeader, setIntHeader, setLocale, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderResponse

protected RenderResponse(javax.portlet.RenderResponse response,
                         javax.portlet.PortletPreferences preferences)
Creates a RenderResponse based on a real RenderResponse object

Method Detail

getCharacterEncoding

public String getCharacterEncoding()
Description copied from interface: Response
Returns the name of the charset used for the MIME body sent in this response.

If no charset has been assigned, it is implicitly set to ISO-8859-1 (Latin-1).

See RFC 2047 (http://ds.internic.net/rfc/rfc2045.txt) for more information about character encoding and MIME.

Specified by:
getCharacterEncoding in interface Response
Overrides:
getCharacterEncoding in class PortletResponse
Returns:
a String specifying the name of the charset, for example, ISO-8859-1

getLocale

public Locale getLocale()
Description copied from interface: Response
Returns the locale assigned to the response.

Specified by:
getLocale in interface Response
Overrides:
getLocale in class PortletResponse
See Also:
Response.setLocale(Locale)

addHeader

public void addHeader(String name,
                      String value)
Description copied from interface: Response
Adds a response header with the given name and value. This method allows response headers to have multiple values.

Specified by:
addHeader in interface Response
Overrides:
addHeader in class PortletResponse
Parameters:
name - the name of the header
value - the additional header value
See Also:
PortletEnvironment.HEADER_PORTLET_TITLE

setHeader

public void setHeader(String name,
                      String value)
Description copied from interface: Response
Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
setHeader in interface Response
Overrides:
setHeader in class PortletResponse
Parameters:
name - the name of the header
value - the header value
See Also:
PortletEnvironment.HEADER_PORTLET_TITLE

getRenderResponse

public javax.portlet.RenderResponse getRenderResponse()
Type cast portletResponse to RenderResponse

Returns:
type casted portletResponse

createActionURL

public javax.portlet.PortletURL createActionURL()

createRenderURL

public javax.portlet.PortletURL createRenderURL()

flushBuffer

public void flushBuffer()
                 throws IOException
Throws:
IOException

getBufferSize

public int getBufferSize()

getContentType

public String getContentType()

getNamespace

public String getNamespace()

getPortletOutputStream

public OutputStream getPortletOutputStream()
                                    throws IOException
Throws:
IOException

getWriter

public PrintWriter getWriter()
                      throws IOException
Throws:
IOException

isCommitted

public boolean isCommitted()

reset

public void reset()

resetBuffer

public void resetBuffer()

setBufferSize

public void setBufferSize(int size)

setContentType

public void setContentType(String type)

setTitle

public void setTitle(String title)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.