|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.portlet.impl.PortletResponseImpl org.jboss.portal.portlet.impl.RenderResponseImpl
Field Summary | |
protected FragmentResult |
result
|
Fields inherited from class org.jboss.portal.portlet.impl.PortletResponseImpl |
creq, cresp, invocation, preq |
Fields inherited from interface javax.portlet.RenderResponse |
EXPIRATION_CACHE |
Constructor Summary | |
RenderResponseImpl(RenderInvocation invocation,
PortletRequestImpl preq)
|
Method Summary | |
PortletURL |
createActionURL()
Creates a portlet URL targeting the portlet. |
PortletURL |
createRenderURL()
Creates a portlet URL targeting the portlet. |
void |
flushBuffer()
Forces any content in the buffer to be written to the client. |
int |
getBufferSize()
Returns the actual buffer size used for the response. |
java.lang.String |
getCharacterEncoding()
Returns the name of the charset used for the MIME body sent in this response. |
java.lang.String |
getContentType()
Returns the MIME type that can be used to contribute markup to the render response. |
java.util.Locale |
getLocale()
Returns the locale assigned to the response. |
java.lang.String |
getNamespace()
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. |
java.io.OutputStream |
getPortletOutputStream()
Returns a OutputStream suitable for writing binary
data in the response. |
Result |
getResult()
|
java.io.PrintWriter |
getWriter()
Returns a PrintWriter object that can send character text to the portal. |
boolean |
isCommitted()
Returns a boolean indicating if the response has been committed. |
void |
reset()
Clears any data that exists in the buffer as well as the properties set. |
void |
resetBuffer()
Clears the content of the underlying buffer in the response without clearing properties set. |
void |
setBufferSize(int i)
Sets the preferred buffer size for the body of the response. |
void |
setContentType(java.lang.String contentType)
Sets the MIME type for the render response. |
void |
setTitle(java.lang.String s)
This method sets the title of the portlet. |
Methods inherited from class org.jboss.portal.portlet.impl.PortletResponseImpl |
addProperty, encodeURL, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.portlet.PortletResponse |
addProperty, encodeURL, setProperty |
Field Detail |
protected FragmentResult result
Constructor Detail |
public RenderResponseImpl(RenderInvocation invocation, PortletRequestImpl preq)
Method Detail |
public Result getResult()
public void setTitle(java.lang.String s)
RenderResponse
The value can be a text String
setTitle
in interface RenderResponse
s
- portlet title as text String or resource URIpublic java.lang.String getContentType()
RenderResponse
If no content type was set previously using the RenderResponse.setContentType(java.lang.String)
method
this method retuns null
.
getContentType
in interface RenderResponse
null
if no content type is setRenderResponse.setContentType(java.lang.String)
public void setContentType(java.lang.String contentType)
RenderResponse
RenderResponse.getWriter()
or
RenderResponse.getPortletOutputStream()
.
Calling setContentType
after getWriter
or getOutputStream
does not change the content type.
setContentType
in interface RenderResponse
contentType
- the content MIME typePortletRequest.getResponseContentTypes()
,
RenderResponse.getContentType()
public java.io.PrintWriter getWriter() throws java.io.IOException
RenderResponse
Before calling this method the content type of the
render response must be set using the RenderResponse.setContentType(java.lang.String)
method.
Either this method or RenderResponse.getPortletOutputStream()
may be
called to write the body, not both.
getWriter
in interface RenderResponse
PrintWriter
object that
can return character data to the portal
java.io.IOException
- if an input or output exception occurredRenderResponse.setContentType(java.lang.String)
,
RenderResponse.getPortletOutputStream()
public java.io.OutputStream getPortletOutputStream() throws java.io.IOException
RenderResponse
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(java.lang.String)
method.
Calling flush()
on the OutputStream commits the response.
Either this method or RenderResponse.getWriter()
may be called to write the body, not both.
getPortletOutputStream
in interface RenderResponse
OutputStream
for writing binary data
java.io.IOException
- if an input or output exception occurredRenderResponse.setContentType(java.lang.String)
,
RenderResponse.getWriter()
public PortletURL createRenderURL()
RenderResponse
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.
createRenderURL
in interface RenderResponse
public PortletURL createActionURL()
RenderResponse
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.
createActionURL
in interface RenderResponse
public java.lang.String getNamespace()
RenderResponse
getNamespace
in interface RenderResponse
public java.lang.String getCharacterEncoding()
RenderResponse
See RFC 2047 for more information about character encoding and MIME.
getCharacterEncoding
in interface RenderResponse
String
specifying the
name of the charset, for
example, ISO-8859-1
public java.util.Locale getLocale()
RenderResponse
getLocale
in interface RenderResponse
public void setBufferSize(int i)
RenderResponse
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
.
setBufferSize
in interface RenderResponse
i
- the preferred buffer sizeRenderResponse.getBufferSize()
,
RenderResponse.flushBuffer()
,
RenderResponse.isCommitted()
,
RenderResponse.reset()
public int getBufferSize()
RenderResponse
getBufferSize
in interface RenderResponse
RenderResponse.setBufferSize(int)
,
RenderResponse.flushBuffer()
,
RenderResponse.isCommitted()
,
RenderResponse.reset()
public void flushBuffer() throws java.io.IOException
RenderResponse
flushBuffer
in interface RenderResponse
java.io.IOException
- if an error occured when writing the outputRenderResponse.setBufferSize(int)
,
RenderResponse.getBufferSize()
,
RenderResponse.isCommitted()
,
RenderResponse.reset()
public void resetBuffer()
RenderResponse
IllegalStateException
.
resetBuffer
in interface RenderResponse
public void reset()
RenderResponse
IllegalStateException
.
reset
in interface RenderResponse
public boolean isCommitted()
RenderResponse
isCommitted
in interface RenderResponse
RenderResponse.setBufferSize(int)
,
RenderResponse.getBufferSize()
,
RenderResponse.flushBuffer()
,
RenderResponse.reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |