Top Description Methods
org.springframework.http.server

public Interface ServerHttpResponse

extends HttpOutputMessage, Flushable, Closeable
Known Direct Implementers
org.springframework.http.server.ServletServerHttpResponse, org.springframework.http.server.DelegatingServerHttpResponse
Imports
java.io.Closeable, .Flushable, .IOException, org.springframework.http.HttpOutputMessage, .HttpStatusCode

Represents a server-side HTTP response.
Author
Arjen Poutsma
Since
3.0

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.io.Closeable.close.

Close this response, freeing any resources created.
public void
flush()

Redeclares java.io.Flushable.flush.

Ensure that the headers and the content of the response are written out.
public void
setStatusCode(HttpStatusCode
the HTTP status as an HttpStatus enum value
status
)

Set the HTTP status code of the response.

Inherited from org.springframework.http.HttpOutputMessage:
getBody

Method Detail

closeback to summary
public void close()

Redeclares java.io.Closeable.close.

Close this response, freeing any resources created.

Annotations
@Override
flushback to summary
public void flush() throws IOException

Redeclares java.io.Flushable.flush.

Ensure that the headers and the content of the response are written out.

After the first flush, headers can no longer be changed. Only further content writing and content flushing is possible.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Flushable.flush.

If an I/O error occurs

setStatusCodeback to summary
public void setStatusCode(HttpStatusCode status)

Set the HTTP status code of the response.

Parameters
status:HttpStatusCode

the HTTP status as an HttpStatus enum value