ServerHttpResponse implementation that is based on a HttpServletResponse.
| Modifier and Type | Class and Description |
|---|---|
| private class | ServletServerHttpResponse.
Extends HttpHeaders with the ability to look up headers already present in the underlying HttpServletResponse. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final HttpHeaders | |
| private boolean | |
| private HttpHeaders | |
| private final HttpServletResponse |
| Access | Constructor and Description |
|---|---|
| public | ServletServerHttpResponse(HttpServletResponse
the servlet response servletResponse)Construct a new instance of the ServletServerHttpResponse based on the given |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements org. Close this response, freeing any resources created. |
| public void | flush()
Implements org. Ensure that the headers and the content of the response are written out. |
| public OutputStream | getBody()
Implements org. Return the body of the message as an output stream. |
| public HttpHeaders | getHeaders()
Implements org. Return the headers of this message. |
| public HttpServletResponse | |
| public void | setStatusCode(HttpStatusCode
the HTTP status as an HttpStatus enum value status)Implements org. Set the HTTP status code of the response. |
| private void |
| bodyUsed | back to summary |
|---|---|
| private boolean bodyUsed | |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| headersWritten | back to summary |
|---|---|
| private boolean headersWritten | |
| readOnlyHeaders | back to summary |
|---|---|
| private HttpHeaders readOnlyHeaders
| |
| servletResponse | back to summary |
|---|---|
| private final HttpServletResponse servletResponse | |
| ServletServerHttpResponse | back to summary |
|---|---|
| public ServletServerHttpResponse(HttpServletResponse servletResponse) Construct a new instance of the ServletServerHttpResponse based on the given
| |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Close this response, freeing any resources created.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements org. Doc from org. 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.
| |
| getBody | back to summary |
|---|---|
| public OutputStream getBody() throws IOException Implements org. Doc from org. Return the body of the message as an output stream.
| |
| getHeaders | back to summary |
|---|---|
| public HttpHeaders getHeaders() Implements org. Doc from org. Return the headers of this message.
| |
| getServletResponse | back to summary |
|---|---|
| public HttpServletResponse getServletResponse() Return the | |
| setStatusCode | back to summary |
|---|---|
| public void setStatusCode(HttpStatusCode status) Implements org. Doc from org. Set the HTTP status code of the response.
| |
| writeHeaders | back to summary |
|---|---|
| private void writeHeaders() | |
The intent is merely to expose what is available through the HttpServletResponse i.e. the ability to look up specific header values by name. All other map-related operations (e.g. iteration, removal, etc) apply only to values added directly through HttpHeaders methods.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsKey(Object
key whose presence in this map is to be tested key)Overrides org. Implements java. Returns |
| public List | get(Object
the key whose associated value is to be returned key)Overrides org. Implements java. Returns the value to which the specified key is mapped,
or |
| public String | getFirst(String
the header name headerName)Overrides org. Implements org. Return the first header value for the given header name, if any. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| ServletResponseHttpHeaders | back to summary |
|---|---|
| private ServletResponseHttpHeaders() | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Overrides org. Implements java. Doc from java. Returns | |
| get | back to summary |
|---|---|
| public List Overrides org. Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| getFirst | back to summary |
|---|---|
| public String getFirst(String headerName) Overrides org. Implements org. Doc from org. Return the first header value for the given header name, if any. | |