HttpServletResponse wrapped as a core Response.
All write operations are internally converted to blocking writes on the servlet API.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Request | |
| private final HttpFields. | |
| private final boolean | |
| private final HttpServletResponse | |
| private final ServletContextResponse |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public HttpFields. | |
| public Request | |
| public HttpServletResponse | |
| public int | |
| public Supplier | |
| public boolean | hasLastWrite()
Implements org. Returns whether the last write has been initiated on the response. |
| public boolean | isCommitted()
Implements org. Returns whether this response has already been committed. |
| public boolean | isCompletedSuccessfully()
Implements org. Returns whether the response completed successfully. |
| private boolean | |
| public void | reset()
Implements org. Resets this response, clearing the HTTP status code, HTTP headers and HTTP trailers. |
| public void | setStatus(int
the response HTTP status code code)Implements org. |
| public void | setTrailersSupplier(Supplier<HttpFields>
a supplier for the HTTP trailers trailers)Implements org. Sets the supplier for the HTTP trailers. |
| public String | |
| public void | write(boolean
whether the ByteBuffer is the last to write last, ByteBuffer the ByteBuffer to write byteBuffer, Callback the callback to notify when the write operation is complete callback)Implements org. Writes the given |
| public CompletableFuture | writeInterim(int
the interim HTTP status code status, HttpFields the HTTP headers headers)Implements org. Writes an |
| _coreRequest | back to summary |
|---|---|
| private final Request _coreRequest | |
| _httpFields | back to summary |
|---|---|
| private final HttpFields. | |
| _included | back to summary |
|---|---|
| private final boolean _included | |
| _response | back to summary |
|---|---|
| private final HttpServletResponse _response | |
| _servletContextResponse | back to summary |
|---|---|
| private final ServletContextResponse _servletContextResponse | |
| ServletCoreResponse | back to summary |
|---|---|
| public ServletCoreResponse(Request coreRequest, HttpServletResponse response, boolean included) | |
| getHeaders | back to summary |
|---|---|
| public HttpFields. Implements org.
| |
| getRequest | back to summary |
|---|---|
| public Request getRequest() Implements org.
| |
| getServletResponse | back to summary |
|---|---|
| public HttpServletResponse getServletResponse() | |
| getStatus | back to summary |
|---|---|
| public int getStatus() Implements org.
| |
| getTrailersSupplier | back to summary |
|---|---|
| public Supplier Implements org.
| |
| hasLastWrite | back to summary |
|---|---|
| public boolean hasLastWrite() Implements org. Doc from org. Returns whether the last write has been initiated on the response.
| |
| isCommitted | back to summary |
|---|---|
| public boolean isCommitted() Implements org. Doc from org. Returns whether this response has already been committed. Committing a response means that the HTTP status code and HTTP headers cannot be modified anymore, typically because they have already been serialized and sent over the network.
| |
| isCompletedSuccessfully | back to summary |
|---|---|
| public boolean isCompletedSuccessfully() Implements org. Doc from org. Returns whether the response completed successfully. The response HTTP status code, HTTP headers and content have been successfully serialized and sent over the network without errors.
| |
| isWriting | back to summary |
|---|---|
| private boolean isWriting() | |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Resets this response, clearing the HTTP status code, HTTP headers and HTTP trailers.
| |
| setStatus | back to summary |
|---|---|
| public void setStatus(int code) Implements org. Doc from org. Set the response HTTP status code.
| |
| setTrailersSupplier | back to summary |
|---|---|
| public void setTrailersSupplier(Supplier<HttpFields> trailers) Implements org. Doc from org. Sets the supplier for the HTTP trailers. The method Example:
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| write | back to summary |
|---|---|
| public void write(boolean last, ByteBuffer byteBuffer, Callback callback) Implements org. Doc from org. Writes the given Implementations guarantee that calls to this method are safely reentrant so that
stack overflows are avoided in the case of mutual recursion between the execution of
the The invocation of the passed Thus a
| |
| writeInterim | back to summary |
|---|---|
| public CompletableFuture Implements org. Doc from org. Writes an It is possible to write more than one interim response, for example
in case of The returned
| |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpServletResponse |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public HttpFields. | add(String
the non- name, String null name of the fieldthe non- value)null value of the fieldOverrides default org. Adds a new |
| public HttpFields. | add(HttpHeader
the non- header, HttpHeaderValue null name of the fieldthe non- value)null value of the fieldOverrides default org. Adds a new |
| public HttpFields. | add(HttpHeader
the non- header, String null name of the fieldthe non- value)null value of the fieldOverrides default org. Adds a new |
| public HttpFields. | add(HttpField
the field)HttpField to addOverrides default org. Adds the given |
| public ListIterator | |
| public HttpFields. | put(HttpField
the field to put field)Overrides default org. Puts the given |
| public HttpFields. | put(String
the name of the field name, String the value of the field; if value)null the field is removedOverrides default org. This method behaves like |
| public HttpFields. | put(HttpHeader
the name of the field header, HttpHeaderValue the value of the field; if value)null the field is removedOverrides default org. This method behaves like |
| public HttpFields. | put(HttpHeader
the name of the field header, String the value of the field; if value)null the field is removedOverrides default org. This method behaves like |
| public HttpFields. | put(String
the name of the field name, List<String> the List value of the field. If null the field is cleared. list)Overrides default org. Puts a field associated with a list of values. |
| public HttpFields. | remove(HttpHeader
the name of the fields to remove header)Overrides default org. Removes all the fields with the given name. |
| public HttpFields. | remove(EnumSet<HttpHeader>
the names of the fields to remove fields)Overrides default org. Removes all the fields with the given names. |
| public HttpFields. | remove(String
the name of the fields to remove name)Overrides default org. Removes all the fields with the given name. |
| _response | back to summary |
|---|---|
| private final HttpServletResponse _response | |
| HttpServletResponseHttpFields | back to summary |
|---|---|
| private HttpServletResponseHttpFields(HttpServletResponse response) | |
| add | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Adds a new The new
| |
| add | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Adds a new The new
| |
| add | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Adds a new The new
| |
| add | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Adds the given
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Implements org.
| |
| put | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Puts the given If a fields with the same name is present, the given field replaces it, and other existing fields with the same name are removed, so that only the given field will be present. If a field with the same name is not present, the given field will be added.
| |
| put | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. This method behaves like
| |
| put | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. This method behaves like
| |
| put | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. This method behaves like
| |
| put | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Puts a field associated with a list of values. | |
| remove | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Removes all the fields with the given name.
| |
| remove | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Removes all the fields with the given names.
| |
| remove | back to summary |
|---|---|
| public HttpFields. Overrides default org. Doc from org. Removes all the fields with the given name.
| |