org.apache.wicket.portlet
Class ResponseState

java.lang.Object
  extended by org.apache.wicket.portlet.ResponseState

public class ResponseState
extends Object

Temporarily holds the current state of a Wicket response when invoked from WicketPortlet: buffer, headers, state and the redirect location to be processed afterwards within WicketPortlet

Author:
Ate Douma, Peter Pastrnak

Constructor Summary
ResponseState(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, File responseBufferFolder)
           
 
Method Summary
 void addCookie(Cookie cookie)
           
 void addDateHeader(String name, long date)
           
 void addHeader(String name, String value)
           
 void addIntHeader(String name, int value)
           
 void clear()
           
 boolean containsHeader(String name)
           
 void flushAndClose()
           
 void flushBuffer()
           
 String getAjaxRedirectLocation()
           
 int getBufferSize()
           
 String getCharacterEncoding()
           
 String getContentType()
           
 Locale getLocale()
           
 ServletOutputStream getOutputStream()
           
 String getRedirectLocation()
           
 PrintWriter getWriter()
           
 boolean isActionResponse()
           
 boolean isCommitted()
           
 boolean isEventResponse()
           
 boolean isMimeResponse()
           
 boolean isRenderResponse()
           
 boolean isResourceResponse()
           
 boolean isStateAwareResponse()
           
 void reset()
           
 void resetBuffer()
           
 void sendError(int errorCode)
           
 void sendError(int errorCode, String errorMessage)
           
 void sendRedirect(String redirectLocation)
           
 void setBufferSize(int size)
           
 void setCharacterEncoding(String charset)
           
 void setContentLength(int len)
           
 void setContentType(String type)
           
 void setDateHeader(String name, long date)
           
 void setHeader(String name, String value)
           
 void setIntHeader(String name, int value)
           
 void setLocale(Locale locale)
           
 void setStatus(int statusCode)
           
 void setStatus(int statusCode, String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseState

public ResponseState(javax.portlet.PortletRequest request,
                     javax.portlet.PortletResponse response,
                     File responseBufferFolder)
Method Detail

isActionResponse

public boolean isActionResponse()

isEventResponse

public boolean isEventResponse()

isRenderResponse

public boolean isRenderResponse()

isResourceResponse

public boolean isResourceResponse()

isMimeResponse

public boolean isMimeResponse()

isStateAwareResponse

public boolean isStateAwareResponse()

addCookie

public void addCookie(Cookie cookie)

addDateHeader

public void addDateHeader(String name,
                          long date)

addHeader

public void addHeader(String name,
                      String value)

addIntHeader

public void addIntHeader(String name,
                         int value)

containsHeader

public boolean containsHeader(String name)

sendError

public void sendError(int errorCode,
                      String errorMessage)
               throws IOException
Throws:
IOException

sendError

public void sendError(int errorCode)
               throws IOException
Throws:
IOException

sendRedirect

public void sendRedirect(String redirectLocation)
                  throws IOException
Throws:
IOException

getRedirectLocation

public String getRedirectLocation()

getAjaxRedirectLocation

public String getAjaxRedirectLocation()

setDateHeader

public void setDateHeader(String name,
                          long date)

setHeader

public void setHeader(String name,
                      String value)

setIntHeader

public void setIntHeader(String name,
                         int value)

setStatus

public void setStatus(int statusCode,
                      String message)

setStatus

public void setStatus(int statusCode)

flushBuffer

public void flushBuffer()
                 throws IOException
Throws:
IOException

getBufferSize

public int getBufferSize()

getCharacterEncoding

public String getCharacterEncoding()

getContentType

public String getContentType()

getLocale

public Locale getLocale()

getOutputStream

public ServletOutputStream getOutputStream()
                                    throws IOException
Throws:
IOException

getWriter

public PrintWriter getWriter()
                      throws IOException
Throws:
IOException

isCommitted

public boolean isCommitted()

reset

public void reset()

resetBuffer

public void resetBuffer()

setBufferSize

public void setBufferSize(int size)

setCharacterEncoding

public void setCharacterEncoding(String charset)

setContentLength

public void setContentLength(int len)

setContentType

public void setContentType(String type)

setLocale

public void setLocale(Locale locale)

clear

public void clear()

flushAndClose

public void flushAndClose()
                   throws IOException
Throws:
IOException


Copyright © 2015. All Rights Reserved.