public class DefaultWebFilterChain extends Object implements WebFilterChain
WebFilterChain
.
Each instance of this class represents one link in the chain. The public
constructor DefaultWebFilterChain(WebHandler, List)
initializes the full chain and represents its first link.
This class is immutable and thread-safe. It can be created once and re-used to handle request concurrently.
Constructor and Description |
---|
DefaultWebFilterChain(WebHandler handler,
List<WebFilter> filters)
Public constructor with the list of filters and the target handler to use.
|
DefaultWebFilterChain(WebHandler handler,
WebFilter... filters)
Deprecated.
as of 5.1 this constructor is deprecated in favor of
DefaultWebFilterChain(WebHandler, List) . |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
filter(ServerWebExchange exchange)
Delegate to the next
WebFilter in the chain. |
List<WebFilter> |
getFilters() |
WebHandler |
getHandler() |
public DefaultWebFilterChain(WebHandler handler, List<WebFilter> filters)
handler
- the target handlerfilters
- the filters ahead of the handler@Deprecated public DefaultWebFilterChain(WebHandler handler, WebFilter... filters)
DefaultWebFilterChain(WebHandler, List)
.handler
- the target handlerfilters
- the filters ahead of the handlerpublic WebHandler getHandler()
public reactor.core.publisher.Mono<Void> filter(ServerWebExchange exchange)
WebFilterChain
WebFilter
in the chain.filter
in interface WebFilterChain
exchange
- the current server exchangeMono<Void>
to indicate when request handling is complete