Class ServerWebExchangeDelegatingServerHttpHeadersWriter
java.lang.Object
org.springframework.security.web.server.header.ServerWebExchangeDelegatingServerHttpHeadersWriter
- All Implemented Interfaces:
ServerHttpHeadersWriter
public final class ServerWebExchangeDelegatingServerHttpHeadersWriter
extends Object
implements ServerHttpHeadersWriter
Delegates to a provided
ServerHttpHeadersWriter
if
ServerWebExchangeMatcher.matches(ServerWebExchange)
returns a match.- Since:
- 5.8
-
Constructor Summary
ConstructorDescriptionServerWebExchangeDelegatingServerHttpHeadersWriter
(ServerWebExchangeMatcherEntry<ServerHttpHeadersWriter> headersWriter) Creates a new instanceServerWebExchangeDelegatingServerHttpHeadersWriter
(ServerWebExchangeMatcher webExchangeMatcher, ServerHttpHeadersWriter delegateHeadersWriter) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
writeHttpHeaders
(org.springframework.web.server.ServerWebExchange exchange) Write the headers to the response.
-
Constructor Details
-
ServerWebExchangeDelegatingServerHttpHeadersWriter
public ServerWebExchangeDelegatingServerHttpHeadersWriter(ServerWebExchangeMatcherEntry<ServerHttpHeadersWriter> headersWriter) Creates a new instance- Parameters:
headersWriter
- theServerWebExchangeMatcherEntry
holding aServerWebExchangeMatcher
and theServerHttpHeadersWriter
to invoke if the matcher returns a match.
-
ServerWebExchangeDelegatingServerHttpHeadersWriter
public ServerWebExchangeDelegatingServerHttpHeadersWriter(ServerWebExchangeMatcher webExchangeMatcher, ServerHttpHeadersWriter delegateHeadersWriter) Creates a new instance- Parameters:
webExchangeMatcher
- theServerWebExchangeMatcher
to use. If it returns a match, the delegateHeadersWriter is invoked.delegateHeadersWriter
- theServerHttpHeadersWriter
to invoke if theServerWebExchangeMatcher
returns a match.
-
-
Method Details
-
writeHttpHeaders
public reactor.core.publisher.Mono<Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange) Description copied from interface:ServerHttpHeadersWriter
Write the headers to the response.- Specified by:
writeHttpHeaders
in interfaceServerHttpHeadersWriter
- Returns:
- A Mono which is returned to the
Supplier
of theReactiveHttpOutputMessage.beforeCommit(Supplier)
.
-