|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceResponse
The ResourceResponse defines an object to assist a portlet for rendering a resource.
The difference between the RenderResponse is that for the ResourceResponse the output of this response is delivered directly to the client without any additional markup added by the portal. It is therefore allowed for the portlet to return binary content in this response.
A portlet can set HTTP headers for the response via the setProperty or addProperty call in the ResourceResponse. To be successfully transmitted back to the client, headers must be set before the response is committed. Headers set after the response is committed will be ignored by the portlet container.
The portlet container creates a ResourceResponse object and passes it as argument to the portlet's serveResource method.
Field Summary | |
---|---|
static java.lang.String | HTTP_STATUS_CODE
Constant for setting the HTTP status code via the setProperty method. |
Fields inherited from interface javax.portlet.MimeResponse |
---|
CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT |
Method Summary | |
---|---|
PortletURL | createActionURL()
Creates a portlet URL targeting the portlet. |
PortletURL | createRenderURL()
Creates a portlet URL targeting the portlet. |
ResourceURL | createResourceURL()
Creates a portlet URL targeting the portlet. |
void | setCharacterEncoding(java.lang.String charset)
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
void | setContentLength(int len)
Sets the length of the content body in the response. |
void | setLocale(java.util.Locale loc)
Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate. |
Methods inherited from interface javax.portlet.MimeResponse |
---|
flushBuffer, getBufferSize, getCacheControl, getCharacterEncoding, getContentType, getLocale, getPortletOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setContentType |
Methods inherited from interface javax.portlet.PortletResponse |
---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty |
Field Detail |
---|
static final java.lang.String HTTP_STATUS_CODE
Method Detail |
---|
void setLocale(java.util.Locale loc)
void setCharacterEncoding(java.lang.String charset)
This method can be called repeatedly to change the character encoding. This method has no effect if it is called after getWriter has been called or after the response has been committed.
void setContentLength(int len)
PortletURL createRenderURL()
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.
PortletURL createActionURL()
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.
ResourceURL createResourceURL()
If a request is triggered by the PortletURL, it results in a serve resource request of the ResourceServingPortlet interface.
The returned URL can be further extended by adding portlet-specific parameters .
The created URL will per default contain the current cacheability setting of the parent resource. If no parent resource is available, PAGE is the default.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |