|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Response
Abstract base class for different implementations of response writing. A subclass must implement write(String) to write a String to the response destination (whether it be a browser, a file, a test harness or some other place). A subclass may optionally implement close(), encodeURL(String), redirect(String), isRedirect() or setContentType(String) as appropriate.
| Constructor Summary | |
Response()
|
|
| Method Summary | |
void |
close()
Closes the response output stream |
java.lang.String |
encodeURL(java.lang.String url)
An implementation of this method is only required if a subclass wishes to support sessions via URL rewriting. |
abstract java.io.OutputStream |
getOutputStream()
|
boolean |
isRedirect()
Returns true if a redirection has occurred. |
void |
redirect(java.lang.String url)
A subclass may override this method to implement redirection. |
void |
setContentLength(long length)
Set the content length on the response, if appropriate in the subclass. |
void |
setContentType(java.lang.String mimeType)
Set the content type on the response, if appropriate in the subclass. |
void |
setLastModifiedTime(Time time)
Set the contents last modified time, if appropriate in the subclass. |
void |
setLocale(java.util.Locale locale)
|
void |
write(ComponentTag tag)
Writes the given tag to via the write(String) abstract method. |
abstract void |
write(java.lang.String string)
Writes the given string to the Response subclass output destination. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Response()
| Method Detail |
public void close()
public java.lang.String encodeURL(java.lang.String url)
url - The URL to encode
public abstract java.io.OutputStream getOutputStream()
public boolean isRedirect()
public void redirect(java.lang.String url)
url - The URL to redirect topublic void setContentLength(long length)
length - The length of the contentpublic void setContentType(java.lang.String mimeType)
mimeType - The mime typepublic void setLastModifiedTime(Time time)
time - The time objectpublic void setLocale(java.util.Locale locale)
locale - Locale to use for this responsepublic final void write(ComponentTag tag)
tag - The tag to writepublic abstract void write(java.lang.String string)
string - The string to write
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||