Top Description Inners Fields Constructors Methods
org.springframework.web.reactive.function.server

pack-priv Class DefaultServerRequestBuilder

extends Object
implements Builder
Class Inheritance
All Implemented Interfaces
org.springframework.web.reactive.function.server.ServerRequest.Builder
Imports
java.net.URI, java.nio.charset.StandardCharsets, java.security.Principal, java.time.Instant, java.util.LinkedHashMap, .List, .Map, java.util.function.Consumer, .Function, java.util.regex.Matcher, .Pattern, reactor.core.publisher.Flux, .Mono, org.springframework.context.ApplicationContext, org.springframework.context.i18n.LocaleContext, org.springframework.core.ResolvableType, org.springframework.core.codec.Hints, org.springframework.core.io.buffer.DataBuffer, .DataBufferUtils, .DefaultDataBufferFactory, org.springframework.http.HttpCookie, .HttpHeaders, .HttpMethod, .InvalidMediaTypeException, .MediaType, org.springframework.http.codec.HttpMessageReader, org.springframework.http.codec.multipart.Part, org.springframework.http.server.RequestPath, org.springframework.http.server.reactive.ServerHttpRequest, .ServerHttpResponse, org.springframework.lang.Nullable, org.springframework.util.Assert, .CollectionUtils, .LinkedMultiValueMap, .MultiValueMap, .StringUtils, org.springframework.web.server.ServerWebExchange, .WebSession, org.springframework.web.util.UriUtils

Default ServerRequest.Builder implementation.
Authors
Arjen Poutsma, Sam Brannen
Since
5.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>
private Flux<DataBuffer>
private String
private final MultiValueMap<String, HttpCookie>
private final ServerWebExchange
private final HttpHeaders
private final List<HttpMessageReader<?>>
private HttpMethod
private URI

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ServerRequest.Builder
attribute(String
the attribute name
name
,
Object
the attribute value
value
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.attribute.

Add an attribute with the given name and value.

public ServerRequest.Builder
attributes(Consumer<Map<String, Object>>
a function that consumes the attributes map
attributesConsumer
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.attributes.

Manipulate this request's attributes with the given consumer.

public ServerRequest.Builder
body(Flux<DataBuffer>
the new body
body
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.body.

Set the body of the request.

public ServerRequest.Builder
body(String
the new body
body
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.body.

Set the body of the request to the UTF-8 encoded bytes of the given string.

public ServerRequest
public ServerRequest.Builder
contextPath(String
the new context path
contextPath
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.contextPath.

Set the context path of the request.

public ServerRequest.Builder
cookies(Consumer<MultiValueMap<String, HttpCookie>>
a function that consumes the cookies map
cookiesConsumer
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.cookies.

Manipulate this request's cookies with the given consumer.

public ServerRequest.Builder
header(String
the header name
headerName
,
String...
the header value(s)
headerValues
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.header.

Add the given header value(s) under the given name.

public ServerRequest.Builder
headers(Consumer<HttpHeaders>
a function that consumes the HttpHeaders
headersConsumer
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.headers.

Manipulate this request's headers with the given consumer.

public ServerRequest.Builder
method(HttpMethod
the new method
method
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.method.

Set the method of the request.

private void
public ServerRequest.Builder
uri(URI
the new URI
uri
)

Implements org.springframework.web.reactive.function.server.ServerRequest.Builder.uri.

Set the URI of the request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait