|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.loom.resolution.AbstractHttpResolution
public abstract class AbstractHttpResolution
A response object with http headers.
| Constructor Summary | |
|---|---|
AbstractHttpResolution()
|
|
| Method Summary | |
|---|---|
void |
addCookie(javax.servlet.http.Cookie cookie)
Adds a cookie |
void |
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). |
void |
addCookie(java.lang.String name,
java.lang.String value,
int maxAge)
Adds a cookie |
void |
addDateHeader(java.lang.String name,
java.util.Date value)
Add a date http header. |
void |
addHeader(java.lang.String name,
java.lang.String value)
Add a string http header. |
void |
addIntHeader(java.lang.String name,
int value)
Add an integer http header. |
boolean |
containsHeader(java.lang.String name)
|
CacheControl |
getCacheControl()
|
java.lang.String |
getCharset()
|
java.lang.String |
getContentType()
|
abstract void |
resolve(LoomServletRequest request,
LoomServletResponse response)
Write the response contents |
AbstractHttpResolution |
setCacheControl(CacheControl cacheControl)
Sets the cache data to be sent to the browser |
void |
setCharset(java.lang.String charset)
|
void |
setContentType(java.lang.String contentType)
|
void |
setDateHeader(java.lang.String name,
java.util.Date value)
Set a date http header. |
void |
setDateHeaderIfNotPresent(java.lang.String name,
java.util.Date value)
Set a Date http header if it has not been set. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Set a String http header. |
void |
setHeaderIfNotPresent(java.lang.String name,
java.lang.String value)
Set a String http header if it has not been set. |
void |
setIntHeader(java.lang.String name,
int value)
Set an integer http header. |
void |
setIntHeaderIfNotPresent(java.lang.String name,
int value)
Set an integer http header if it's not already set. |
void |
setJsonHeader(JsonMarshaller marshaller)
sets the X-JSON http header |
protected void |
writeHeaders(LoomServletRequest request,
LoomServletResponse response)
Adds http headers to the response before resolving |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractHttpResolution()
| Method Detail |
|---|
public abstract void resolve(LoomServletRequest request,
LoomServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
Resolution
resolve in interface Resolutionrequest - the current request objectresponse - the current response object
java.io.IOException
javax.servlet.ServletException
protected void writeHeaders(LoomServletRequest request,
LoomServletResponse response)
public void addCookie(java.lang.String name,
java.lang.String value)
name - the name of the cookievalue - the value of the Cookie
public void 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).public void addCookie(javax.servlet.http.Cookie cookie)
cookie - the cookie to be added to the response
public void addHeader(java.lang.String name,
java.lang.String value)
name - the name of the http headervalue - the value of the http header
public void addDateHeader(java.lang.String name,
java.util.Date value)
name - the name of the http headervalue - the value of the http header
public void addIntHeader(java.lang.String name,
int value)
name - the name of the http headervalue - the value of the http header
public void setHeader(java.lang.String name,
java.lang.String value)
name - the name of the http headervalue - the value of the http header
public void setHeaderIfNotPresent(java.lang.String name,
java.lang.String value)
name - the name of the http headervalue - the value of the http header
public void setDateHeader(java.lang.String name,
java.util.Date value)
name - the name of the http headervalue - the value of the http header
public void setDateHeaderIfNotPresent(java.lang.String name,
java.util.Date value)
name - the name of the http headervalue - the value of the http header
public void setIntHeader(java.lang.String name,
int value)
name - the name of the http headervalue - the value of the http header
public void setIntHeaderIfNotPresent(java.lang.String name,
int value)
name - the name of the http headervalue - the value of the http headerpublic void setJsonHeader(JsonMarshaller marshaller)
marshaller - the JSON object to be added as http headerpublic boolean containsHeader(java.lang.String name)
name - the http header name to check
public CacheControl getCacheControl()
public AbstractHttpResolution setCacheControl(CacheControl cacheControl)
CacheableResolution
setCacheControl in interface CacheableResolutioncacheControl - the cache data.
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||