Class AbstractListenerServerHttpResponse
java.lang.Object
org.springframework.http.server.reactive.AbstractServerHttpResponse
org.springframework.http.server.reactive.AbstractListenerServerHttpResponse
- All Implemented Interfaces:
HttpMessage
,ReactiveHttpOutputMessage
,ServerHttpResponse
Abstract base class for listener-based server responses.
- Since:
- 5.0
- Author:
- Arjen Poutsma
-
Constructor Summary
ConstructorDescriptionAbstractListenerServerHttpResponse
(DataBufferFactory bufferFactory) AbstractListenerServerHttpResponse
(DataBufferFactory bufferFactory, HttpHeaders headers) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Processor<? super Publisher<? extends DataBuffer>,
Void> Abstract template method to create aProcessor<Publisher<DataBuffer>, Void>
that will write the response body with flushes to the underlying output.protected final reactor.core.publisher.Mono<Void>
writeAndFlushWithInternal
(Publisher<? extends Publisher<? extends DataBuffer>> body) Write to the underlying the response, and flush after eachPublisher<DataBuffer>
.protected final reactor.core.publisher.Mono<Void>
writeWithInternal
(Publisher<? extends DataBuffer> body) Write to the underlying the response.Methods inherited from class org.springframework.http.server.reactive.AbstractServerHttpResponse
addCookie, applyCookies, applyHeaders, applyStatusCode, beforeCommit, bufferFactory, doCommit, doCommit, getCookies, getHeaders, getNativeResponse, getRawStatusCode, getStatusCode, isCommitted, setComplete, setRawStatusCode, setStatusCode, touchDataBuffer, writeAndFlushWith, writeWith
-
Constructor Details
-
AbstractListenerServerHttpResponse
-
AbstractListenerServerHttpResponse
-
-
Method Details
-
writeWithInternal
protected final reactor.core.publisher.Mono<Void> writeWithInternal(Publisher<? extends DataBuffer> body) Description copied from class:AbstractServerHttpResponse
Write to the underlying the response.- Specified by:
writeWithInternal
in classAbstractServerHttpResponse
- Parameters:
body
- the publisher to write with
-
writeAndFlushWithInternal
protected final reactor.core.publisher.Mono<Void> writeAndFlushWithInternal(Publisher<? extends Publisher<? extends DataBuffer>> body) Description copied from class:AbstractServerHttpResponse
Write to the underlying the response, and flush after eachPublisher<DataBuffer>
.- Specified by:
writeAndFlushWithInternal
in classAbstractServerHttpResponse
- Parameters:
body
- the publisher to write and flush with
-
createBodyFlushProcessor
protected abstract Processor<? super Publisher<? extends DataBuffer>,Void> createBodyFlushProcessor()Abstract template method to create aProcessor<Publisher<DataBuffer>, Void>
that will write the response body with flushes to the underlying output. Called fromwriteAndFlushWithInternal(Publisher)
.
-