ServerHttpResponse to the Servlet HttpServletResponse.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ServletServerHttpResponse. | |
| private volatile ServletServerHttpResponse. | |
| private volatile ServletServerHttpResponse. | |
| private final int | |
| private volatile boolean | |
| private final ServletOutputStream | |
| private final ServletServerHttpRequest | |
| private final HttpServletResponse |
| Access | Constructor and Description |
|---|---|
| public | ServletServerHttpResponse(HttpServletResponse response, AsyncContext asyncContext, DataBufferFactory bufferFactory, int bufferSize, ServletServerHttpRequest request)
|
| public | ServletServerHttpResponse(HttpHeaders headers, HttpServletResponse response, AsyncContext asyncContext, DataBufferFactory bufferFactory, int bufferSize, ServletServerHttpRequest request)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | applyCookies()
Implements abstract org. getHeaders() to the underlying response.
|
| protected void | applyHeaders()
Implements abstract org. |
| protected void | applyStatusCode()
Implements abstract org. |
| protected Processor | createBodyFlushProcessor()
Implements abstract org. Processor<Publisher<DataBuffer>, Void>
that will write the response body with flushes to the underlying output.
|
| private void | |
| pack-priv AsyncListener | getAsyncListener()
Return an |
| public <T> T | getNativeResponse()
Implements abstract org. |
| protected final ServletOutputStream | |
| public Integer | getRawStatusCode()
Overrides org. Overrides default org.
Deprecated
Return the status code that has been set, or otherwise fall back on the
status of the response from the underlying server.
|
| public HttpStatusCode | getStatusCode()
Overrides org. Implements org. |
| private boolean | |
| protected int | Returns: the number of bytes writtenWrite the DataBuffer to the response body OutputStream. |
| asyncListener | back to summary |
|---|---|
| private final ServletServerHttpResponse. | |
| bodyFlushProcessor | back to summary |
|---|---|
| private volatile ServletServerHttpResponse. | |
| bodyProcessor | back to summary |
|---|---|
| private volatile ServletServerHttpResponse. | |
| bufferSize | back to summary |
|---|---|
| private final int bufferSize | |
| flushOnNext | back to summary |
|---|---|
| private volatile boolean flushOnNext | |
| outputStream | back to summary |
|---|---|
| private final ServletOutputStream outputStream | |
| request | back to summary |
|---|---|
| private final ServletServerHttpRequest request | |
| response | back to summary |
|---|---|
| private final HttpServletResponse response | |
| ServletServerHttpResponse | back to summary |
|---|---|
| public ServletServerHttpResponse(HttpServletResponse response, AsyncContext asyncContext, DataBufferFactory bufferFactory, int bufferSize, ServletServerHttpRequest request) throws IOException | |
| ServletServerHttpResponse | back to summary |
|---|---|
| public ServletServerHttpResponse(HttpHeaders headers, HttpServletResponse response, AsyncContext asyncContext, DataBufferFactory bufferFactory, int bufferSize, ServletServerHttpRequest request) throws IOException | |
| adaptHeaders | back to summary |
|---|---|
| protected void adaptHeaders(boolean removeAdaptedHeaders) | |
| applyCookies | back to summary |
|---|---|
| protected void applyCookies() Implements abstract org. Doc from org. Add cookies from
| |
| applyHeaders | back to summary |
|---|---|
| protected void applyHeaders() Implements abstract org. Doc from org. Invoked when the response is getting committed allowing subclasses to make apply header values to the underlying response. Note that some subclasses use an
| |
| applyStatusCode | back to summary |
|---|---|
| protected void applyStatusCode() Implements abstract org. Doc from org. Write the status code to the underlying response. This method is called once only.
| |
| createBodyFlushProcessor | back to summary |
|---|---|
| protected Processor Implements abstract org. Doc from org. Abstract template method to create a
| |
| flush | back to summary |
|---|---|
| private void flush() throws IOException | |
| getAsyncListener | back to summary |
|---|---|
| pack-priv AsyncListener getAsyncListener() Return an | |
| getNativeResponse | back to summary |
|---|---|
| public <T> T getNativeResponse() Implements abstract org. Doc from org. Return the underlying server response. Note This is exposed mainly for internal framework use such as WebSocket upgrades in the spring-webflux module.
| |
| getOutputStream | back to summary |
|---|---|
| protected final ServletOutputStream getOutputStream() Return the | |
| getRawStatusCode | back to summary |
|---|---|
| public Integer getRawStatusCode() Overrides org. Overrides default org. Doc from org. Deprecated
Return the status code that has been set, or otherwise fall back on the
status of the response from the underlying server. The return value may
be
| |
| getStatusCode | back to summary |
|---|---|
| public HttpStatusCode getStatusCode() Overrides org. Implements org. Doc from org. Return the status code that has been set, or otherwise fall back on the
status of the response from the underlying server. The return value may
be
| |
| isWritePossible | back to summary |
|---|---|
| private boolean isWritePossible() | |
| writeToOutputStream | back to summary |
|---|---|
| protected int writeToOutputStream(DataBuffer dataBuffer) throws IOException Write the DataBuffer to the response body OutputStream.
Invoked only when
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | onComplete(AsyncEvent
Provides access to the objects associated with the event event)Implements jakarta. AsyncContext#complete() has been processed by the container.
|
| public void | onError(AsyncEvent
Provides access to the objects associated with the event event)Implements jakarta. |
| public void | onStartAsync(AsyncEvent
Provides access to the objects associated with the event event)Implements jakarta. ServletRequest#startAsync() after the completion of the
AsyncContext to which this listener was added.
|
| public void | onTimeout(AsyncEvent
Provides access to the objects associated with the event event)Implements jakarta. |
| ResponseAsyncListener | back to summary |
|---|---|
| private ResponseAsyncListener() | |
| handleError | back to summary |
|---|---|
| public void handleError(Throwable ex) | |
| onComplete | back to summary |
|---|---|
| public void onComplete(AsyncEvent event) Implements jakarta. Doc from jakarta. This event is fired after the call to
| |
| onError | back to summary |
|---|---|
| public void onError(AsyncEvent event) Implements jakarta. Doc from jakarta. This event is fired if an error occurs during an asynchronous operation but before the container takes any action as a result of the error.
| |
| onStartAsync | back to summary |
|---|---|
| public void onStartAsync(AsyncEvent event) Implements jakarta. Doc from jakarta. This event is fired if new call is made to
| |
| onTimeout | back to summary |
|---|---|
| public void onTimeout(AsyncEvent event) Implements jakarta. Doc from jakarta. This event is fired if an asynchronous operation times out but before the container takes any action as a result of the timeout.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Processor | createWriteProcessor()
Implements abstract org. |
| protected void | flush()
Implements abstract org. isFlushPending() should
return true after.
|
| protected boolean | isFlushPending()
Implements abstract org. |
| protected boolean | isWritePossible()
Implements abstract org. |
| ResponseBodyFlushProcessor | back to summary |
|---|---|
| public ResponseBodyFlushProcessor() | |
| createWriteProcessor | back to summary |
|---|---|
| protected Processor Implements abstract org. Doc from org. Create a new processor for the current flush boundary.
| |
| flush | back to summary |
|---|---|
| protected void flush() throws IOException Implements abstract org. Doc from org. Flush the output if ready, or otherwise This is primarily for the Servlet non-blocking I/O API where flush cannot be called without a readyToWrite check.
| |
| isFlushPending | back to summary |
|---|---|
| protected boolean isFlushPending() Implements abstract org. Doc from org. Whether flushing is pending. This is primarily for the Servlet non-blocking I/O API where flush cannot be called without a readyToWrite check.
| |
| isWritePossible | back to summary |
|---|---|
| protected boolean isWritePossible() Implements abstract org. Doc from org. Whether writing/flushing is possible.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | discardData(DataBuffer
the data to be released dataBuffer)Implements abstract org. |
| protected boolean | isDataEmpty(DataBuffer dataBuffer)
Implements abstract org. |
| protected boolean | isWritePossible()
Implements abstract org. |
| protected boolean | write(DataBuffer
the item to write dataBuffer)Implements abstract org. |
| protected void | writingComplete()
Overrides org. |
| ResponseBodyProcessor | back to summary |
|---|---|
| public ResponseBodyProcessor() | |
| discardData | back to summary |
|---|---|
| protected void discardData(DataBuffer dataBuffer) Implements abstract org. Doc from org. Invoked after any error (either from the upstream write Publisher, or from I/O operations to the underlying server) and cancellation to discard in-flight data that was in the process of being written when the error took place.
| |
| isDataEmpty | back to summary |
|---|---|
| protected boolean isDataEmpty(DataBuffer dataBuffer) Implements abstract org. Doc from org. Whether the given data item has any content to write. If false the item is not written.
| |
| isWritePossible | back to summary |
|---|---|
| protected boolean isWritePossible() Implements abstract org. Doc from org. Whether writing is possible.
| |
| write | back to summary |
|---|---|
| protected boolean write(DataBuffer dataBuffer) throws IOException Implements abstract org. Doc from org. Write the given item. Note Sub-classes are responsible for releasing any data buffer associated with the item, once fully written, if pooled buffers apply to the underlying container.
| |
| writingComplete | back to summary |
|---|---|
| protected void writingComplete() Overrides org. Doc from org. Invoked after onComplete or onError notification. The default implementation is a no-op.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | onError(Throwable
The throwable that represents the error that occurred ex)Implements jakarta. |
| public void | onWritePossible()
Implements jakarta. |
| ResponseBodyWriteListener | back to summary |
|---|---|
| private ResponseBodyWriteListener() | |
| onError | back to summary |
|---|---|
| public void onError(Throwable ex) Implements jakarta. Doc from jakarta. Invoked if an error occurs while writing the response. | |
| onWritePossible | back to summary |
|---|---|
| public void onWritePossible() Implements jakarta. Doc from jakarta. Invoked when it it possible to write data without blocking. The container will invoke this method the first time
for a request as soon as data can be written. Subsequent invocations will only occur if a call to
| |