Package com.vaadin.portlet
Class VaadinPortletResponse
- java.lang.Object
-
- com.vaadin.portlet.VaadinPortletResponse
-
- All Implemented Interfaces:
VaadinResponse,Serializable
public class VaadinPortletResponse extends Object implements VaadinResponse
Wrapper forPortletResponseand its subclasses.- Since:
- 7.0
- Author:
- Vaadin Ltd.
- See Also:
VaadinResponse,VaadinPortletRequest, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VaadinPortletResponse(javax.portlet.PortletResponse response, VaadinPortletService vaadinService)Wraps a portlet response and an associated vaadin service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCookie(javax.servlet.http.Cookie cookie)OutputStreamgetOutputStream()javax.portlet.PortletResponsegetPortletResponse()Gets the original, unwrapped portlet response.VaadinPortletServicegetService()PrintWritergetWriter()voidsendError(int errorCode, String message)voidsetCacheTime(long milliseconds)voidsetContentLength(int len)voidsetContentType(String type)voidsetDateHeader(String name, long timestamp)voidsetHeader(String name, String value)voidsetStatus(int responseStatus)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.VaadinResponse
setNoCacheHeaders
-
-
-
-
Constructor Detail
-
VaadinPortletResponse
public VaadinPortletResponse(javax.portlet.PortletResponse response, VaadinPortletService vaadinService)Wraps a portlet response and an associated vaadin service.- Parameters:
response- the portlet response to wrapvaadinService- the associated vaadin service
-
-
Method Detail
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfaceVaadinResponse- Throws:
IOException- See Also:
MimeResponse.getPortletOutputStream()
-
getPortletResponse
public javax.portlet.PortletResponse getPortletResponse()
Gets the original, unwrapped portlet response.- Returns:
- the unwrapped portlet response
-
setContentType
public void setContentType(String type)
- Specified by:
setContentTypein interfaceVaadinResponse- See Also:
MimeResponse.setContentType(String)
-
setContentLength
public void setContentLength(int len)
- Specified by:
setContentLengthin interfaceVaadinResponse
-
getWriter
public PrintWriter getWriter() throws IOException
- Specified by:
getWriterin interfaceVaadinResponse- Throws:
IOException- See Also:
MimeResponse.getWriter()
-
setStatus
public void setStatus(int responseStatus)
- Specified by:
setStatusin interfaceVaadinResponse- See Also:
ResourceResponse.HTTP_STATUS_CODE
-
setHeader
public void setHeader(String name, String value)
- Specified by:
setHeaderin interfaceVaadinResponse- See Also:
PortletResponse.setProperty(String, String)
-
setDateHeader
public void setDateHeader(String name, long timestamp)
- Specified by:
setDateHeaderin interfaceVaadinResponse
-
setCacheTime
public void setCacheTime(long milliseconds)
- Specified by:
setCacheTimein interfaceVaadinResponse
-
sendError
public void sendError(int errorCode, String message) throws IOException- Specified by:
sendErrorin interfaceVaadinResponse- Throws:
IOException
-
getService
public VaadinPortletService getService()
- Specified by:
getServicein interfaceVaadinResponse
-
addCookie
public void addCookie(javax.servlet.http.Cookie cookie)
- Specified by:
addCookiein interfaceVaadinResponse- See Also:
PortletResponse.addProperty(Cookie)
-
-