|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.http.server.ServletServerHttpResponse
public class ServletServerHttpResponse
ServerHttpResponse
implementation that is based on a HttpServletResponse
.
Field Summary | |
---|---|
private HttpHeaders |
headers
|
private boolean |
headersWritten
|
private HttpServletResponse |
servletResponse
|
Constructor Summary | |
---|---|
ServletServerHttpResponse(HttpServletResponse servletResponse)
Construct a new instance of the ServletServerHttpResponse based on the given HttpServletResponse . |
Method Summary | |
---|---|
void |
close()
Close this response, freeing any resources created. |
java.io.OutputStream |
getBody()
Return the body of the message as an output stream. |
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. |
private void |
writeHeaders()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final HttpServletResponse servletResponse
private final HttpHeaders headers
private boolean headersWritten
Constructor Detail |
---|
public ServletServerHttpResponse(HttpServletResponse servletResponse)
HttpServletResponse
.
servletResponse
- the servlet responseMethod Detail |
---|
public HttpServletResponse getServletResponse()
HttpServletResponse
this object is based on.
public void setStatusCode(HttpStatus status)
ServerHttpResponse
setStatusCode
in interface ServerHttpResponse
status
- the HTTP status as an HttpStatus enum valuepublic HttpHeaders getHeaders()
HttpMessage
getHeaders
in interface HttpMessage
public java.io.OutputStream getBody() throws java.io.IOException
HttpOutputMessage
getBody
in interface HttpOutputMessage
java.io.IOException
- in case of I/O Errorspublic void close()
ServerHttpResponse
close
in interface ServerHttpResponse
private void writeHeaders()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |