public class DefaultResponse extends Object implements RestResponse
| Constructor and Description |
|---|
DefaultResponse(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
RestController restController) |
| Modifier and Type | Method and Description |
|---|---|
String |
content() |
String |
contentType() |
void |
cookie(Map cookieInfo) |
void |
cookie(String name,
String value) |
void |
error(Exception e) |
javax.servlet.http.HttpServletResponse |
httpServletResponse() |
Object |
originContent() |
RestResponse |
originContent(Object obj) |
void |
output(String msg) |
void |
outputAsByte(byte[] msg) |
javax.servlet.ServletOutputStream |
outputStream() |
PrintWriter |
printWriter() |
void |
redirectTo(String path,
Map params) |
void |
send() |
int |
status() |
void |
write(byte[] contentByte) |
void |
write(int httpStatus,
String content) |
void |
write(int httpStatus,
String content,
ViewType viewType) |
void |
write(String content) |
void |
write(String content,
ViewType viewType) |
public DefaultResponse(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
RestController restController)
public void write(String content)
write in interface RestResponsepublic void write(String content, ViewType viewType)
write in interface RestResponsepublic void write(int httpStatus,
String content)
write in interface RestResponsepublic void write(int httpStatus,
String content,
ViewType viewType)
write in interface RestResponsepublic void write(byte[] contentByte)
write in interface RestResponsepublic void cookie(String name, String value)
cookie in interface RestResponsepublic void cookie(Map cookieInfo)
cookie in interface RestResponsepublic String content()
content in interface RestResponsepublic Object originContent()
originContent in interface RestResponsepublic void redirectTo(String path, Map params)
redirectTo in interface RestResponsepublic RestResponse originContent(Object obj)
originContent in interface RestResponsepublic int status()
status in interface RestResponsepublic void send()
throws IOException
IOExceptionpublic void error(Exception e) throws IOException
IOExceptionpublic void output(String msg) throws IOException
IOExceptionpublic PrintWriter printWriter() throws IOException
printWriter in interface RestResponseIOExceptionpublic javax.servlet.ServletOutputStream outputStream()
throws IOException
outputStream in interface RestResponseIOExceptionpublic javax.servlet.http.HttpServletResponse httpServletResponse()
throws IOException
httpServletResponse in interface RestResponseIOExceptionpublic String contentType()
contentType in interface RestResponsepublic void outputAsByte(byte[] msg)
throws IOException
IOExceptionCopyright © 2021. All rights reserved.