public class ServletServerHttpResponse extends java.lang.Object implements ServerHttpResponse
ServerHttpResponse implementation that is based on a HttpServletResponse.| Constructor and Description |
|---|
ServletServerHttpResponse(HttpServletResponse servletResponse)
Construct a new instance of the ServletServerHttpResponse based on the given
HttpServletResponse. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this response, freeing any resources created.
|
void |
flush()
TODO
|
java.io.OutputStream |
getBody()
Return the body of the message as an output stream.
|
Cookies |
getCookies()
TODO ..
|
HttpHeaders |
getHeaders()
Return the headers of this message.
|
HttpServletResponse |
getServletResponse()
Return the
HttpServletResponse this object is based on. |
void |
setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
public ServletServerHttpResponse(HttpServletResponse servletResponse)
HttpServletResponse.servletResponse - the servlet responsepublic HttpServletResponse getServletResponse()
HttpServletResponse this object is based on.public void setStatusCode(HttpStatus status)
ServerHttpResponsesetStatusCode in interface ServerHttpResponsestatus - the HTTP status as an HttpStatus enum valuepublic HttpHeaders getHeaders()
HttpMessagegetHeaders in interface HttpMessagepublic Cookies getCookies()
HttpMessagegetCookies in interface HttpMessagepublic java.io.OutputStream getBody()
throws java.io.IOException
HttpOutputMessagegetBody in interface HttpOutputMessagejava.io.IOException - in case of I/O Errorspublic void flush()
throws java.io.IOException
ServerHttpResponseflush in interface ServerHttpResponsejava.io.IOExceptionpublic void close()
ServerHttpResponseclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface ServerHttpResponse