public class ServletHttpTransportResponse extends HttpTransportResponse implements TransportResponse
SC_FOUND, SC_INTERNAL_SERVER_ERROR, SC_NOT_FOUND, SC_OK
Modifier and Type | Method and Description |
---|---|
static ServletHttpTransportResponse |
fromHttpServletResponse(javax.servlet.http.HttpServletResponse httpServletResponse) |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse() |
void |
sendError(int status,
String message) |
void |
sendRedirect(int status,
String location) |
void |
setContentLength(int contentLength) |
void |
setContentType(String contentType) |
void |
setHeader(String name,
String value) |
void |
setStatus(int status) |
void |
writeBody(byte[] bytes,
boolean close) |
void |
writeBody(String string,
boolean close) |
public static ServletHttpTransportResponse fromHttpServletResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
public void setStatus(int status)
setStatus
in class HttpTransportResponse
public void setContentType(String contentType)
setContentType
in class HttpTransportResponse
public void setContentLength(int contentLength)
setContentLength
in class HttpTransportResponse
public void setHeader(String name, String value)
setHeader
in class HttpTransportResponse
public void sendRedirect(int status, String location) throws IOException
sendRedirect
in class HttpTransportResponse
IOException
public void sendError(int status, String message) throws IOException
sendError
in class HttpTransportResponse
IOException
public void writeBody(String string, boolean close) throws IOException
writeBody
in class HttpTransportResponse
IOException
public void writeBody(byte[] bytes, boolean close) throws IOException
writeBody
in class HttpTransportResponse
IOException
Copyright © 2017. All rights reserved.