public abstract class BaseResponseContext extends Object implements WebContext
| Modifier and Type | Field and Description |
|---|---|
protected String |
responseContent |
protected String |
responseContentType |
protected Collection<Cookie> |
responseCookies |
protected String |
responseEncoding |
protected Map<String,String> |
responseHeaders |
protected String |
responseLocation |
protected int |
responseStatus |
| Constructor and Description |
|---|
BaseResponseContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseCookie(Cookie cookie)
Adds cookies to the response
|
String |
getResponseContent() |
String |
getResponseContentType() |
String |
getResponseEncoding() |
Map<String,String> |
getResponseHeaders() |
String |
getResponseLocation() |
int |
getResponseStatus() |
void |
setResponseContentType(String content)
Sets the response content type.
|
void |
setResponseHeader(String name,
String value)
Add a header to the response.
|
void |
setResponseStatus(int code)
Set the response status.
|
void |
writeResponseContent(String content)
Write some content in the response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFullRequestURL, getPath, getRemoteAddr, getRequestAttribute, getRequestCookies, getRequestHeader, getRequestMethod, getRequestParameter, getRequestParameters, getScheme, getServerName, getServerPort, getSessionAttribute, getSessionIdentifier, isSecure, setRequestAttribute, setSessionAttributeprotected String responseContent
protected int responseStatus
protected String responseLocation
protected String responseContentType
protected String responseEncoding
protected final Collection<Cookie> responseCookies
public void writeResponseContent(String content)
WebContextwriteResponseContent in interface WebContextcontent - content to write in responsepublic void setResponseStatus(int code)
WebContextsetResponseStatus in interface WebContextcode - status code to set for the responsepublic void setResponseHeader(String name, String value)
WebContextsetResponseHeader in interface WebContextname - name of the headervalue - value of the headerpublic String getResponseContent()
public int getResponseStatus()
public String getResponseLocation()
public void setResponseContentType(String content)
WebContextsetResponseContentType in interface WebContextcontent - the content typepublic String getResponseContentType()
public String getResponseEncoding()
public void addResponseCookie(Cookie cookie)
WebContextaddResponseCookie in interface WebContextcookie - a cookie to add to the responseCopyright © 2016. All Rights Reserved.