|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpResolution
A response object with http headers.
Method Summary | |
---|---|
HttpResolution |
addCookie(javax.servlet.http.Cookie cookie)
Adds a cookie |
HttpResolution |
addCookie(java.lang.String name,
java.lang.String value)
Adds a cookie that will not be stored on disk (will be deleted when the browser is closed). |
HttpResolution |
addCookie(java.lang.String name,
java.lang.String value,
int maxAge)
Adds a cookie |
HttpResolution |
addHeader(java.lang.String name,
java.lang.Object value)
Add a http header. |
HttpResolution |
setCacheControl(CacheControl cacheControl)
Sets the cache data to be sent to the browser |
HttpResolution |
setCharset(java.lang.String charset)
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
HttpResolution |
setContentType(java.lang.String contentType)
Sets the content type of the response being sent to the client, if the response has not been committed yet. |
HttpResolution |
setHeader(java.lang.String name,
java.lang.Object value)
Set a String http header. |
HttpResolution |
setHeaderIfNotPresent(java.lang.String name,
java.lang.Object value)
Set a String http header if it has not been set. |
Methods inherited from interface org.loom.resolution.Resolution |
---|
resolve |
Method Detail |
---|
HttpResolution addCookie(java.lang.String name, java.lang.String value)
name
- the name of the cookievalue
- the value of the CookieHttpResolution addCookie(java.lang.String name, java.lang.String value, int maxAge)
name
- the name of the cookievalue
- the value of the CookiemaxAge
- can be positive (number of seconds that it will be stored in
the browser), zero (to delete the cookie from the browser) or
a negative value (to indicate that the cookie should not be
stored in disk and will be forgotten when the browser exists).HttpResolution addCookie(javax.servlet.http.Cookie cookie)
cookie
- the cookie to be added to the responseHttpResolution addHeader(java.lang.String name, java.lang.Object value)
name
- the name of the http headervalue
- the value of the http header. Date, int and String are supported. Anything else will be cast to toString(). Null will be ignored.HttpResolution setHeader(java.lang.String name, java.lang.Object value)
name
- the name of the http headervalue
- the value of the http headerHttpResolution setHeaderIfNotPresent(java.lang.String name, java.lang.Object value)
name
- the name of the http headervalue
- the value of the http headerHttpResolution setCharset(java.lang.String charset)
HttpResolution setContentType(java.lang.String contentType)
text/html;charset=UTF-8
.
Notice that #setCharset(String) can also be used for this.
HttpResolution setCacheControl(CacheControl cacheControl)
CacheableResolution
setCacheControl
in interface CacheableResolution
cacheControl
- the cache data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |