org.apache.wicket.request
Class Response

java.lang.Object
  extended by org.apache.wicket.request.Response
Direct Known Subclasses:
ByteArrayResponse, NullResponse, StringResponse, WebResponse

public abstract class Response
extends java.lang.Object

Abstract base class for different implementations of response writing.

The implementation may not support calling both write(byte[]) and write(CharSequence) on the same Response instance.

Author:
Matej Knopp, igor.vaynberg

Constructor Summary
Response()
           
 
Method Summary
 void close()
          Closes the response
abstract  java.lang.String encodeURL(java.lang.CharSequence url)
          Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged.
abstract  java.lang.Object getContainerResponse()
          Provides access to the low-level container response object that implementaion of this Response delegate to.
 void reset()
          Called when the Response needs to reset itself.
abstract  void write(byte[] array)
          Writes the buffer to output.
abstract  void write(java.lang.CharSequence sequence)
          Writes the CharSequence to output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response()
Method Detail

write

public abstract void write(java.lang.CharSequence sequence)
Writes the CharSequence to output.

Parameters:
sequence -
Throws:
java.lang.IllegalStateException - if write(byte[]) has already been called on this instance

write

public abstract void write(byte[] array)
Writes the buffer to output.

Parameters:
array -
Throws:
java.lang.IllegalStateException - if write(CharSequence) has already been called on this instance

close

public void close()
Closes the response


encodeURL

public abstract java.lang.String encodeURL(java.lang.CharSequence url)
Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged.

Parameters:
url -
Returns:
encoded URL

reset

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


getContainerResponse

public abstract java.lang.Object getContainerResponse()
Provides access to the low-level container response object that implementaion of this Response delegate to. This allows users to access features provided by the container response but not by generalized Wicket Response objects.

Returns:
low-level container response object, or null if none


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