org.apache.wicket.request.target.basic
Class StringRequestTarget

java.lang.Object
  extended by org.apache.wicket.request.target.basic.StringRequestTarget
All Implemented Interfaces:
IRequestTarget

public class StringRequestTarget
extends Object
implements IRequestTarget

Request target that responds by sending its string property.

Author:
Eelco Hillenius

Constructor Summary
StringRequestTarget(String string)
          Creates a string request target with content type text/plain and default charset (usually UTF-8)
StringRequestTarget(String contentType, Charset charset, String string)
          Deprecated. use StringRequestTarget(String, String, String) instead
StringRequestTarget(String contentType, String encoding, String string)
          Constructor
 
Method Summary
 void detach(RequestCycle 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.
 boolean equals(Object obj)
           
 String getString()
          Gets the string property.
 int hashCode()
           
 void respond(RequestCycle requestCycle)
          Responds by sending the string property.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringRequestTarget

public StringRequestTarget(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

StringRequestTarget

public StringRequestTarget(String contentType,
                           String encoding,
                           String string)
Constructor

Parameters:
contentType - content type of the data the string represents eg text/html; charset=utf-8
encoding - charset to use
string - string for the response

StringRequestTarget

@Deprecated
public StringRequestTarget(String contentType,
                                      Charset charset,
                                      String string)
Deprecated. use StringRequestTarget(String, String, String) instead

Constructor

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

respond

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

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

detach

public void detach(RequestCycle requestCycle)
Description copied from interface: IRequestTarget
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 IRequestTarget
Parameters:
requestCycle - the current request cycle
See Also:
IRequestTarget.detach(org.apache.wicket.RequestCycle)

getString

public String getString()
Gets the string property.

Returns:
the string property

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

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


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