ServerWebExchange. Pre-implements all methods by delegating to the
wrapped instance.Note
if the purpose for using a decorator is to override
properties like getPrincipal(), consider using
ServerWebExchange#mutate() instead.
ServerWebExchange#mutate()
| Modifier and Type | Field and Description |
|---|---|
| private final ServerWebExchange |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addUrlTransformer(Function<String, String>
a URL transformation function to add transformer)Implements org. Register an additional URL transformation function for use with |
| public boolean | checkNotModified(Instant
the last-modified time lastModified)Implements org. An overloaded variant of |
| public boolean | checkNotModified(String
the entity tag for the underlying resource. etag)Implements org. An overloaded variant of |
| public boolean | checkNotModified(String
the entity tag that the application determined for the
underlying resource. This parameter will be padded with quotes (")
if necessary. etag, Instant the last-modified timestamp that the application
determined for the underlying resource lastModified)Implements org. Check whether the requested resource has been modified given the supplied
|
| public Mono | cleanupMultipart()
Overrides default org. Cleans up any storage used for multipart handling. |
| public ApplicationContext | getApplicationContext()
Implements org. Return the |
| public Map | getAttributes()
Implements org. Return a mutable map of request attributes for the current exchange. |
| public ServerWebExchange | |
| public Mono | getFormData()
Implements org. Return the form data from the body of the request if the Content-Type is
|
| public LocaleContext | getLocaleContext()
Implements org. Return the |
| public String | getLogPrefix()
Implements org. Return a log message prefix to use to correlate messages for this exchange. |
| public Mono | getMultipartData()
Implements org. Return the parts of a multipart request if the Content-Type is
|
| public <T extends Principal> Mono | getPrincipal()
Implements org. Return the authenticated user for the request, if any. |
| public ServerHttpRequest | getRequest()
Implements org. Return the current HTTP request. |
| public ServerHttpResponse | getResponse()
Implements org. Return the current HTTP response. |
| public Mono | getSession()
Implements org. Return the web session for the current request. |
| public boolean | isNotModified()
Implements org. Returns |
| public String | |
| public String | transformUrl(String
the URL to transform url)Implements org. Transform the given url according to the registered transformation function(s). |
| delegate | back to summary |
|---|---|
| private final ServerWebExchange delegate | |
| ServerWebExchangeDecorator | back to summary |
|---|---|
| protected ServerWebExchangeDecorator(ServerWebExchange delegate) | |
| addUrlTransformer | back to summary |
|---|---|
| public void addUrlTransformer(Function<String, String> transformer) Implements org. Doc from org. Register an additional URL transformation function for use with Note that the given function is applied after any previously registered functions. | |
| checkNotModified | back to summary |
|---|---|
| public boolean checkNotModified(Instant lastModified) Implements org. Doc from org. An overloaded variant of | |
| checkNotModified | back to summary |
|---|---|
| public boolean checkNotModified(String etag) Implements org. Doc from org. An overloaded variant of | |
| checkNotModified | back to summary |
|---|---|
| public boolean checkNotModified(String etag, Instant lastModified) Implements org. Doc from org. Check whether the requested resource has been modified given the supplied
Note The HTTP specification recommends setting both
ETag and Last-Modified values, but you can also use
| |
| cleanupMultipart | back to summary |
|---|---|
| public Mono Overrides default org. Doc from org. Cleans up any storage used for multipart handling.
| |
| getApplicationContext | back to summary |
|---|---|
| public ApplicationContext getApplicationContext() Implements org. Doc from org. Return the
| |
| getAttributes | back to summary |
|---|---|
| public Map Implements org. Doc from org. Return a mutable map of request attributes for the current exchange.
| |
| getDelegate | back to summary |
|---|---|
| public ServerWebExchange getDelegate() | |
| getFormData | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Return the form data from the body of the request if the Content-Type is
Note calling this method causes the request body to
be read and parsed in full and the resulting
| |
| getLocaleContext | back to summary |
|---|---|
| public LocaleContext getLocaleContext() Implements org. Doc from org. Return the
| |
| getLogPrefix | back to summary |
|---|---|
| public String getLogPrefix() Implements org. Doc from org. Return a log message prefix to use to correlate messages for this exchange.
The prefix is based on the value of the attribute
| |
| getMultipartData | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Return the parts of a multipart request if the Content-Type is
Note calling this method causes the request body to
be read and parsed in full and the resulting Note the contents of each part is not cached, and can only be read once.
| |
| getPrincipal | back to summary |
|---|---|
| public <T extends Principal> Mono Implements org. Doc from org. Return the authenticated user for the request, if any.
| |
| getRequest | back to summary |
|---|---|
| public ServerHttpRequest getRequest() Implements org. Doc from org. Return the current HTTP request.
| |
| getResponse | back to summary |
|---|---|
| public ServerHttpResponse getResponse() Implements org. Doc from org. Return the current HTTP response.
| |
| getSession | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Return the web session for the current request. Always guaranteed to
return an instance either matching to the session id requested by the
client, or with a new session id either because the client did not
specify one or because the underlying session had expired. Use of this
method does not automatically create a session. See
| |
| isNotModified | back to summary |
|---|---|
| public boolean isNotModified() Implements org. Doc from org. Returns
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| transformUrl | back to summary |
|---|---|
| public String transformUrl(String url) Implements org. Doc from org. Transform the given url according to the registered transformation function(s).
By default, this method returns the given | |