Make the signature of RHOM#writeAndFlush() more flexible

This modifies the signature of
ReactiveHttpOutputMessage#writeAndFlush(...) in order to
be able to use Flux<Flux<DataBuffer>> objects as arguments of
this method.

Issue: SPR-14952
This commit is contained in:
Daniel Fernández
2016-11-24 22:58:10 +01:00
committed by Sebastien Deleuze
parent a143b57d4b
commit a98be035a3
11 changed files with 21 additions and 21 deletions

View File

@@ -52,7 +52,7 @@ public class MockServerHttpResponse implements ServerHttpResponse {
private Publisher<DataBuffer> body;
private Publisher<Publisher<DataBuffer>> bodyWithFlushes;
private Publisher<? extends Publisher<DataBuffer>> bodyWithFlushes;
private DataBufferFactory bufferFactory = new DefaultDataBufferFactory();
@@ -81,7 +81,7 @@ public class MockServerHttpResponse implements ServerHttpResponse {
return this.body;
}
public Publisher<Publisher<DataBuffer>> getBodyWithFlush() {
public Publisher<? extends Publisher<DataBuffer>> getBodyWithFlush() {
return this.bodyWithFlushes;
}
@@ -92,7 +92,7 @@ public class MockServerHttpResponse implements ServerHttpResponse {
}
@Override
public Mono<Void> writeAndFlushWith(Publisher<Publisher<DataBuffer>> body) {
public Mono<Void> writeAndFlushWith(Publisher<? extends Publisher<DataBuffer>> body) {
this.bodyWithFlushes = body;
return Flux.from(this.bodyWithFlushes).then();
}