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. transformUrl.
|
| public boolean | checkNotModified(Instant
the last-modified time lastModified)Implements org. checkNotModified(String, Instant) with
a last-modified timestamp only.
|
| public boolean | checkNotModified(String
the entity tag for the underlying resource. etag)Implements org. checkNotModified(String, Instant) with
an ETag (entity tag) value only.
|
| 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. ETag (entity tag) and last-modified timestamp as determined by
the application.
|
| public Mono | cleanupMultipart()
Overrides default org. |
| public ApplicationContext | getApplicationContext()
Implements org. ApplicationContext associated with the web application,
if it was initialized with one via
org..
|
| public Map | getAttributes()
Implements org. |
| public ServerWebExchange | |
| public Mono | getFormData()
Implements org. "application/x-www-form-urlencoded" or an empty map otherwise.
|
| public LocaleContext | getLocaleContext()
Implements org. LocaleContext using the configured
org..
|
| public String | getLogPrefix()
Implements org. |
| public Mono | getMultipartData()
Implements org. "multipart/form-data" or an empty map otherwise.
|
| public <T extends Principal> Mono | getPrincipal()
Implements org. |
| public ServerHttpRequest | getRequest()
Implements org. |
| public ServerHttpResponse | getResponse()
Implements org. |
| public Mono | getSession()
Implements org. |
| public boolean | isNotModified()
Implements org. true if the one of the checkNotModified methods
in this contract were used and they returned true.
|
| public String | |
| public String | transformUrl(String
the URL to transform url)Implements org. |
| 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. | |
| 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 | |