public class VisalloResponse extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EXPIRES_1_HOUR |
static org.visallo.web.clientapi.model.ClientApiSuccess |
SUCCESS |
| Constructor and Description |
|---|
VisalloResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
addETagHeader(String eTag) |
void |
addHeader(String name,
String value) |
static void |
configureResponse(ResponseTypes type,
javax.servlet.http.HttpServletResponse response,
Object responseData) |
void |
flushBuffer() |
String |
generateETag(byte[] data) |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse() |
OutputStream |
getOutputStream() |
void |
respondWithBadRequest(String parameterName,
String errorMessage,
List<String> invalidValues) |
void |
respondWithClientApiObject(org.visallo.web.clientapi.model.ClientApiObject obj) |
void |
respondWithHtml(String html) |
void |
respondWithJson(org.json.JSONObject jsonObject) |
void |
respondWithNotFound() |
void |
respondWithNotFound(String message) |
void |
respondWithNotModified() |
void |
respondWithSuccessJson() |
void |
setCharacterEncoding(String charset) |
void |
setContentLength(int length) |
void |
setContentType(String contentType) |
void |
setHeader(String name,
String value) |
void |
setMaxAge(int numberOfSeconds) |
void |
setStatus(int statusCode) |
boolean |
testEtagHeaders(String eTag) |
void |
write(byte[] bytes) |
void |
write(InputStream in) |
public static final int EXPIRES_1_HOUR
public static final org.visallo.web.clientapi.model.ClientApiSuccess SUCCESS
public VisalloResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public void respondWithClientApiObject(org.visallo.web.clientapi.model.ClientApiObject obj)
throws IOException
IOExceptionpublic void respondWithNotFound()
throws IOException
IOExceptionpublic void respondWithNotFound(String message) throws IOException
IOExceptionpublic void respondWithBadRequest(String parameterName, String errorMessage, List<String> invalidValues) throws IOException
IOExceptionpublic void respondWithSuccessJson()
public void respondWithJson(org.json.JSONObject jsonObject)
public void respondWithHtml(String html)
public String generateETag(byte[] data)
public void addETagHeader(String eTag)
public boolean testEtagHeaders(String eTag) throws IOException
IOExceptionpublic void respondWithNotModified()
throws IOException
IOExceptionpublic void write(byte[] bytes)
throws IOException
IOExceptionpublic void write(InputStream in) throws IOException
IOExceptionpublic void setContentType(String contentType)
public void setMaxAge(int numberOfSeconds)
public OutputStream getOutputStream()
public void flushBuffer()
public void setStatus(int statusCode)
public void setContentLength(int length)
public void setCharacterEncoding(String charset)
public static void configureResponse(ResponseTypes type, javax.servlet.http.HttpServletResponse response, Object responseData)
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
Copyright © 2013–2016 V5 Analytics. All rights reserved.