public static interface ServerWebExchange.Builder
ServerWebExchange
.
Removes the needModifier and Type | Method and Description |
---|---|
ServerWebExchange |
build()
Build a
ServerWebExchange decorator with the mutated properties. |
ServerWebExchange.Builder |
principal(reactor.core.publisher.Mono<java.security.Principal> principalMono)
Set the
Mono<Principal> to return for this exchange. |
ServerWebExchange.Builder |
request(java.util.function.Consumer<ServerHttpRequest.Builder> requestBuilderConsumer)
Configure a consumer to modify the current request using a builder.
|
ServerWebExchange.Builder |
request(ServerHttpRequest request)
Set the request to use especially when there is a need to override
ServerHttpRequest methods. |
ServerWebExchange.Builder |
response(ServerHttpResponse response)
Set the response to use.
|
ServerWebExchange.Builder request(java.util.function.Consumer<ServerHttpRequest.Builder> requestBuilderConsumer)
Effectively this:
exchange.mutate().request(builder-> builder.method(HttpMethod.PUT)); // vs... ServerHttpRequest request = exchange.getRequest().mutate() .method(HttpMethod.PUT) .build(); exchange.mutate().request(request);
ServerHttpRequest.mutate()
ServerWebExchange.Builder request(ServerHttpRequest request)
ServerHttpRequest
methods. To simply mutate request properties
see request(Consumer)
instead.ServerHttpRequestDecorator
ServerWebExchange.Builder response(ServerHttpResponse response)
ServerHttpResponseDecorator
ServerWebExchange.Builder principal(reactor.core.publisher.Mono<java.security.Principal> principalMono)
Mono<Principal>
to return for this exchange.ServerWebExchange build()
ServerWebExchange
decorator with the mutated properties.