|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.portlet.filter.PortletResponseWrapper
javax.portlet.filter.ResourceResponseWrapper
public class ResourceResponseWrapper
The ResourceResponseWrapper provides a convenient
implementation of the ResourceResponse interface
that can be subclassed by developers wishing to adapt the response.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped response object.
ResourceResponse| Field Summary |
|---|
| Fields inherited from interface javax.portlet.ResourceResponse |
|---|
HTTP_STATUS_CODE |
| Fields inherited from interface javax.portlet.MimeResponse |
|---|
CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT |
| Constructor Summary | |
|---|---|
ResourceResponseWrapper(ResourceResponse response)
Creates an ResourceResponse adaptor
wrapping the given response object. |
|
| Method Summary | |
|---|---|
PortletURL |
createActionURL()
The default behavior of this method is to call createActionURL() on the wrapped response object. |
PortletURL |
createRenderURL()
The default behavior of this method is to call createRenderURL() on the wrapped response object. |
ResourceURL |
createResourceURL()
The default behavior of this method is to call createResourceURL() on the wrapped response object. |
void |
flushBuffer()
The default behavior of this method is to call flushBuffer() on the wrapped response object. |
int |
getBufferSize()
The default behavior of this method is to call getBufferSize() on the wrapped response object. |
CacheControl |
getCacheControl()
The default behavior of this method is to call getCacheControl() on the wrapped response object. |
java.lang.String |
getCharacterEncoding()
The default behavior of this method is to call getCharacterEncoding() on the wrapped response object. |
java.lang.String |
getContentType()
The default behavior of this method is to call getContentType() on the wrapped response object. |
java.util.Locale |
getLocale()
The default behavior of this method is to call getLocale() on the wrapped response object. |
java.io.OutputStream |
getPortletOutputStream()
The default behavior of this method is to call getPortletOutputStream() on the wrapped response object. |
ResourceResponse |
getResponse()
Return the wrapped response object. |
java.io.PrintWriter |
getWriter()
The default behavior of this method is to call getWriter() on the wrapped response object. |
boolean |
isCommitted()
The default behavior of this method is to call isCommitted() on the wrapped response object. |
void |
reset()
The default behavior of this method is to call reset() on the wrapped response object. |
void |
resetBuffer()
The default behavior of this method is to call resetBuffer() on the wrapped response object. |
void |
setBufferSize(int size)
The default behavior of this method is to call setBufferSize(size) on the wrapped response object. |
void |
setCharacterEncoding(java.lang.String charset)
The default behavior of this method is to call setCharacterEncoding(String charset) on the wrapped response object. |
void |
setContentLength(int len)
The default behavior of this method is to call setContentLength() on the wrapped response object. |
void |
setContentType(java.lang.String type)
The default behavior of this method is to call setContentType(type) on the wrapped response object. |
void |
setLocale(java.util.Locale loc)
The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object. |
void |
setResponse(ResourceResponse response)
Sets the response object being wrapped. |
| Methods inherited from class javax.portlet.filter.PortletResponseWrapper |
|---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty, setResponse |
| 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, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty |
| Constructor Detail |
|---|
public ResourceResponseWrapper(ResourceResponse response)
ResourceResponse adaptor
wrapping the given response object.
response - the event response to wrap
java.lang.IllegalArgumentException - if the response is null| Method Detail |
|---|
public void flushBuffer()
throws java.io.IOException
flushBuffer() on the wrapped response object.
flushBuffer in interface MimeResponsejava.io.IOException - if an error occurred when writing the outputMimeResponse.setBufferSize(int),
MimeResponse.getBufferSize(),
MimeResponse.isCommitted(),
MimeResponse.reset()public int getBufferSize()
getBufferSize() on the wrapped response object.
getBufferSize in interface MimeResponseMimeResponse.setBufferSize(int),
MimeResponse.flushBuffer(),
MimeResponse.isCommitted(),
MimeResponse.reset()public java.lang.String getCharacterEncoding()
getCharacterEncoding() on the wrapped response object.
getCharacterEncoding in interface MimeResponseString specifying the name of the charset, for
example, ISO-8859-1public java.lang.String getContentType()
getContentType() on the wrapped response object.
getContentType in interface MimeResponsenull if no
content type is setMimeResponse.setContentType(java.lang.String)public java.util.Locale getLocale()
getLocale() on the wrapped response object.
getLocale in interface MimeResponse
public java.io.OutputStream getPortletOutputStream()
throws java.io.IOException
getPortletOutputStream() on the wrapped response object.
getPortletOutputStream in interface MimeResponseOutputStream for writing binary data
java.io.IOException - if an input or output exception occurredMimeResponse.setContentType(java.lang.String),
MimeResponse.getWriter()
public java.io.PrintWriter getWriter()
throws java.io.IOException
getWriter() on the wrapped response object.
getWriter in interface MimeResponsePrintWriter object that can return character
data to the portal
java.io.IOException - if an input or output exception occurredMimeResponse.setContentType(java.lang.String),
MimeResponse.getPortletOutputStream()public boolean isCommitted()
isCommitted() on the wrapped response object.
isCommitted in interface MimeResponseMimeResponse.setBufferSize(int),
MimeResponse.getBufferSize(),
MimeResponse.flushBuffer(),
MimeResponse.reset()public void reset()
reset() on the wrapped response object.
reset in interface MimeResponseMimeResponse.setBufferSize(int),
MimeResponse.getBufferSize(),
MimeResponse.flushBuffer(),
MimeResponse.isCommitted()public void resetBuffer()
resetBuffer() on the wrapped response object.
resetBuffer in interface MimeResponseMimeResponse.setBufferSize(int),
MimeResponse.getBufferSize(),
MimeResponse.isCommitted(),
MimeResponse.reset()public void setBufferSize(int size)
setBufferSize(size) on the wrapped response object.
setBufferSize in interface MimeResponsesize - the preferred buffer sizeMimeResponse.getBufferSize(),
MimeResponse.flushBuffer(),
MimeResponse.isCommitted(),
MimeResponse.reset()public void setContentType(java.lang.String type)
setContentType(type) on the wrapped response object.
setContentType in interface MimeResponsetype - the content MIME typePortletRequest.getResponseContentTypes(),
MimeResponse.getContentType()public CacheControl getCacheControl()
getCacheControl() on the wrapped response object.
getCacheControl in interface MimeResponsepublic void setCharacterEncoding(java.lang.String charset)
setCharacterEncoding(String charset) on the wrapped response object.
setCharacterEncoding in interface ResourceResponsecharset - a String specifying only the character set defined by
IANA Character Sets (http://www.iana.org/assignments/character-sets)public void setLocale(java.util.Locale loc)
setLocale(Locale loc) on the wrapped response object.
setLocale in interface ResourceResponseloc - the new locale of the responsepublic void setContentLength(int len)
setContentLength() on the wrapped response object.
setContentLength in interface ResourceResponselen - an integer specifying the length of the content being returnedpublic ResourceResponse getResponse()
getResponse in class PortletResponseWrapperpublic void setResponse(ResourceResponse response)
response - the response to set
java.lang.IllegalArgumentException - if the response is null.
public PortletURL createActionURL()
throws java.lang.IllegalStateException
createActionURL() on the wrapped response object.
createActionURL in interface MimeResponsecreateActionURL in interface ResourceResponsejava.lang.IllegalStateException - if the cacheability level of the resource URL
triggering this serveResource call
is not PAGE and thus does not allow
for creating action URLs.
public PortletURL createRenderURL()
throws java.lang.IllegalStateException
createRenderURL() on the wrapped response object.
createRenderURL in interface MimeResponsecreateRenderURL in interface ResourceResponsejava.lang.IllegalStateException - if the cacheability level of the resource URL
triggering this serveResource call
is not PAGE and thus does not allow
for creating render URLs.
public ResourceURL createResourceURL()
throws java.lang.IllegalStateException
createResourceURL() on the wrapped response object.
createResourceURL in interface MimeResponsecreateResourceURL in interface ResourceResponsejava.lang.IllegalStateException - if the cacheability level of the resource URL
triggering this serveResource call,
or one of the parent calls, have defined a stricter
cachability level.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||