org.apache.wicket.protocol.http
Class BufferedWebResponse

java.lang.Object
  extended by org.apache.wicket.Response
      extended by org.apache.wicket.protocol.http.WebResponse
          extended by org.apache.wicket.protocol.http.BufferedWebResponse

public class BufferedWebResponse
extends WebResponse

Subclass of WebResponse which buffers output and any redirection.

Author:
Jonathan Locke

Field Summary
 
Fields inherited from class org.apache.wicket.protocol.http.WebResponse
redirect
 
Constructor Summary
BufferedWebResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
          Package private constructor.
 
Method Summary
 void close()
          Flushes the response buffer by doing a redirect or writing out the buffer.
 void filter()
          THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.
 void redirect(String url)
          Saves url to redirect to when buffered response is flushed.
 void reset()
          Called when the Response needs to reset itself.
 String toString()
           
 void write(CharSequence string)
          Writes string to response output.
 
Methods inherited from class org.apache.wicket.protocol.http.WebResponse
addCookie, clearCookie, configureAjaxRedirect, disableCaching, encodeURL, getHttpServletResponse, getOutputStream, isAjax, isRedirect, sendRedirect, setAjax, setAttachmentHeader, setContentLength, setContentType, setDateHeader, setHeader, setLastModifiedTime, setLocale, write
 
Methods inherited from class org.apache.wicket.Response
detectContentType, filter, getCharacterEncoding, println, setCharacterEncoding, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferedWebResponse

public BufferedWebResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
Package private constructor.

Parameters:
httpServletResponse - The servlet response object
Method Detail

close

public void close()
Flushes the response buffer by doing a redirect or writing out the buffer. NOTE: The servlet container will close the response output stream.

Overrides:
close in class WebResponse

reset

public void reset()
Description copied from class: Response
Called when the Response needs to reset itself. Subclasses can empty there buffer or build up state.

Overrides:
reset in class Response
See Also:
Response.reset()

redirect

public final void redirect(String url)
Saves url to redirect to when buffered response is flushed. Implementations should encode the URL to make sure cookie-less operation is supported in case clients forgot.

Overrides:
redirect in class WebResponse
Parameters:
url - The URL to redirect to

write

public void write(CharSequence string)
Writes string to response output.

Overrides:
write in class WebResponse
Parameters:
string - The string to write

filter

public final void filter()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.


toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.