public class MimeResponseWrapper extends PortletResponseWrapper implements MimeResponse
MimeResponseWrapper provides
a convenient implementation of the MimeResponse interface that
can be subclassed by developers. This class
implements the Wrapper or Decorator pattern. Methods default to calling
through to the wrapped response object. MimeResponse.CopyCACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT| Constructor and Description |
|---|
MimeResponseWrapper(MimeResponse response) |
| Modifier and Type | Method and Description |
|---|---|
<T extends PortletURL & ActionURL> |
createActionURL()
The default behavior of this method is to call
createActionURL() on the wrapped response object. |
ActionURL |
createActionURL(MimeResponse.Copy option)
The default behavior of this method is to
call
createActionURL(ParameterCopyOption) on the wrapped
response object. |
<T extends PortletURL & RenderURL> |
createRenderURL()
The default behavior of this method is to call
createRenderURL() on the wrapped response object. |
RenderURL |
createRenderURL(MimeResponse.Copy option)
The default behavior of this method is to
call
createRenderURL(ParameterCopyOption) 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. |
String |
getCharacterEncoding()
The default behavior of this method is to call
getCharacterEncoding() on the wrapped response object. |
String |
getContentType()
The default behavior of this method is to call
getContentType() on the wrapped response object. |
Locale |
getLocale()
The default behavior of this method is to call
getLocale() on
the wrapped response object. |
OutputStream |
getPortletOutputStream()
The default behavior of this method is to call
getPortletOutputStream() on the wrapped response object. |
MimeResponse |
getResponse()
Return the wrapped response object.
|
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 |
setContentType(String type)
The default behavior of this method is to call
setContentType(type) on the wrapped response object. |
void |
setResponse(MimeResponse response)
Sets the response object being wrapped.
|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, getProperty, getPropertyNames, getPropertyValues, setProperty, setResponseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, getProperty, getPropertyNames, getPropertyValues, setPropertypublic MimeResponseWrapper(MimeResponse response)
response - public MimeResponse getResponse()
getResponse in class PortletResponseWrapperpublic void setResponse(MimeResponse response)
response - the response to setIllegalArgumentException - if the response is null.public void flushBuffer()
throws IOException
flushBuffer()
on the wrapped response object.flushBuffer in interface MimeResponseIOException - 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 String getCharacterEncoding()
getCharacterEncoding() on the wrapped response object.getCharacterEncoding in interface MimeResponseString specifying the name of the charset, for
example, ISO-8859-1public String getContentType()
getContentType() on the wrapped response object.getContentType in interface MimeResponsenull if no
content type is setMimeResponse.setContentType(java.lang.String)public Locale getLocale()
getLocale() on
the wrapped response object.getLocale in interface MimeResponsepublic OutputStream getPortletOutputStream() throws IOException
getPortletOutputStream() on the wrapped response object.getPortletOutputStream in interface MimeResponseOutputStream for writing binary dataIOException - if an input or output exception occurredMimeResponse.setContentType(java.lang.String),
MimeResponse.getWriter()public PrintWriter getWriter() throws IOException
getWriter() on
the wrapped response object.getWriter in interface MimeResponsePrintWriter object that can return character
data to the portalIOException - 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 CacheControl getCacheControl()
getCacheControl() on the wrapped response object.getCacheControl in interface MimeResponsepublic <T extends PortletURL & ActionURL> T createActionURL() throws IllegalStateException
createActionURL() on the wrapped response object.createActionURL in interface MimeResponseIllegalStateExceptionpublic ActionURL createActionURL(MimeResponse.Copy option) throws IllegalStateException
createActionURL(ParameterCopyOption) on the wrapped
response object.createActionURL in interface MimeResponseoption - Specifies how current parameters are to be copied to the URLIllegalStateExceptionMimeResponse.Copypublic <T extends PortletURL & RenderURL> T createRenderURL() throws IllegalStateException
createRenderURL() on the wrapped response object.createRenderURL in interface MimeResponseIllegalStateExceptionpublic RenderURL createRenderURL(MimeResponse.Copy option) throws IllegalStateException
createRenderURL(ParameterCopyOption) on the wrapped
response object.createRenderURL in interface MimeResponseoption - Specifies how current parameters are to be copied to the URLIllegalStateExceptionMimeResponse.Copypublic ResourceURL createResourceURL() throws IllegalStateException
createResourceURL() on the wrapped response object.createResourceURL in interface MimeResponseIllegalStateExceptionpublic void setContentType(String type)
setContentType(type) on the wrapped response object.setContentType in interface MimeResponsetype - the content MIME typePortletRequest.getResponseContentTypes(),
MimeResponse.getContentType()Java Portlet 3.0 API Specification. See the Copyright and License provided with this distribution. Use is subject to license terms.