Class ServerWebExchangeDelegatingServerHttpHeadersWriter
- java.lang.Object
-
- org.springframework.security.web.server.header.ServerWebExchangeDelegatingServerHttpHeadersWriter
-
- All Implemented Interfaces:
ServerHttpHeadersWriter
public final class ServerWebExchangeDelegatingServerHttpHeadersWriter extends java.lang.Object implements ServerHttpHeadersWriter
Delegates to a providedServerHttpHeadersWriter
ifServerWebExchangeMatcher.matches(ServerWebExchange)
returns a match.- Since:
- 5.8
-
-
Constructor Summary
Constructors Constructor Description ServerWebExchangeDelegatingServerHttpHeadersWriter(ServerWebExchangeMatcherEntry<ServerHttpHeadersWriter> headersWriter)
Creates a new instanceServerWebExchangeDelegatingServerHttpHeadersWriter(ServerWebExchangeMatcher webExchangeMatcher, ServerHttpHeadersWriter delegateHeadersWriter)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>
writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
Write the headers to the response.
-
-
-
Constructor Detail
-
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 Detail
-
writeHttpHeaders
public reactor.core.publisher.Mono<java.lang.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)
.
-
-