@Override void request(WriteResultPublisher publisher, long n) { Operators.validate(n); } @Override
@Override public Mono<Object> getHandlerInternal(ServerWebExchange exchange) { return Mono.empty(); } }
/** * Set the session to use for the exchange. * <p>This method is mutually exclusive with * {@link #sessionManager(WebSessionManager)}. * @param session the session to use * @see MockWebSession */ public Builder session(WebSession session) { this.sessionManager = exchange -> Mono.just(session); return this; }
private static Mono<String> partFluxDescription(Flux<? extends Part> partsFlux) { return partsFlux.collectList().map(MultipartIntegrationTests::partListDescription); }
@Override public Mono<Void> handle(ServerWebExchange exchange, Throwable ex) { this.ex = ex; return Mono.error(ex); } }
private <T> Consumer<T> updateConnectMono(MonoProcessor<Void> connectMono) { return o -> { if (!connectMono.isTerminated()) { if (o instanceof Throwable) { connectMono.onError((Throwable) o); } else { connectMono.onComplete(); } } }; }
@Override protected void hookOnComplete() { this.sink.complete(); } }
private void handleOnError(Throwable ex) { if (!this.content.isTerminated()) { this.content.onError(ex); } }
/** * Create a new FixedVersionStrategy with the given version string. * @param version the fixed version string to use */ public FixedVersionStrategy(String version) { super(version); this.versionMono = Mono.just(version); }
@Override protected Mono<Void> renderInternal(Map<String, Object> renderAttributes, MediaType contentType, ServerWebExchange exchange) { this.attributes = renderAttributes; return Mono.empty(); } }
@Override public Mono<Void> handle(ServerWebExchange exchange, Throwable ex) { return Mono.error(ex); } }
/** * Set the session to use for the exchange. * <p>This is mutually exclusive with {@link #sessionManager(WebSessionManager)}. * @param session the session to use */ public Builder session(WebSession session) { this.sessionManager = exchange -> Mono.just(session); return this; }
@Override public Mono<Void> doFilter(ServerWebExchange exchange, WebFilterChain chain) { return Mono.empty(); } }
@Override public Mono<Void> handle(ServerWebExchange exchange) { if (this.raise) { throw this.exception; } return Mono.error(this.exception); } }
@Override public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response) { this.request = request; return Mono.empty(); } }