org.apache.wicket.request.handler
Class TextRequestHandler

java.lang.Object
  extended by org.apache.wicket.request.handler.TextRequestHandler
All Implemented Interfaces:
IRequestHandler

public class TextRequestHandler
extends java.lang.Object
implements IRequestHandler

Request target that responds by sending its string property.

Author:
igor.vaynberg, Eelco Hillenius

Constructor Summary
TextRequestHandler(java.lang.String string)
          Creates a string request target with content type text/plain and default charset (usually UTF-8)
TextRequestHandler(java.lang.String contentType, java.lang.String encoding, java.lang.String string)
          Constructor
 
Method Summary
 void detach(IRequestCycle requestCycle)
          This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.
 java.lang.String getString()
          Gets the string property.
 void respond(IRequestCycle requestCycle)
          Responds by sending the string property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextRequestHandler

public TextRequestHandler(java.lang.String string)
Creates a string request target with content type text/plain and default charset (usually UTF-8)

Parameters:
string - the string for the response

TextRequestHandler

public TextRequestHandler(java.lang.String contentType,
                          java.lang.String encoding,
                          java.lang.String string)
Constructor

Parameters:
contentType - content type of the data the string represents, e.g. text/html; charset=utf-8
encoding - charset to use
string - string for the response
Method Detail

respond

public void respond(IRequestCycle requestCycle)
Responds by sending the string property.

Specified by:
respond in interface IRequestHandler
Parameters:
requestCycle - the current request cycle
See Also:
IRequestHandler.respond(org.apache.wicket.request.IRequestCycle)

detach

public void detach(IRequestCycle requestCycle)
This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.

Specified by:
detach in interface IRequestHandler
Parameters:
requestCycle - the current request cycle

getString

public java.lang.String getString()
Gets the string property.

Returns:
the string property


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