Package org.springframework.web.server.handler

# Class DefaultWebFilterChain

java.lang.Object
org.springframework.web.server.handler.DefaultWebFilterChain

All Implemented Interfaces:
  `WebFilterChain`

public class DefaultWebFilterChain extends Object implements WebFilterChain
Default implementation of `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.

Since:
  5.0
Author:
  Rossen Stoyanchev

## Constructor Summary

Constructors
Constructor
Description
`DefaultWebFilterChain(WebHandler handler, List<WebFilter> filters)`
Public constructor with the list of filters and the target handler to use.

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`filter(ServerWebExchange exchange)`
Delegate to the next `WebFilter` in the chain.
`List<WebFilter>`
`getFilters()`
`WebHandler`
`getHandler()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultWebFilterChain

public DefaultWebFilterChain(WebHandler handler, List<WebFilter> filters)
Public constructor with the list of filters and the target handler to use.

Parameters:
  `handler` - the target handler
  `filters` - the filters ahead of the handler
Since:
  5.1

## Method Details

### getFilters

public List<WebFilter> getFilters()

### getHandler

public WebHandler getHandler()

### filter

public reactor.core.publisher.Mono<Void> filter(ServerWebExchange exchange)
Description copied from interface: `WebFilterChain`
Delegate to the next `WebFilter` in the chain.

Specified by:
  `filter` in interface `WebFilterChain`
Parameters:
  `exchange` - the current server exchange
Returns:
  `Mono<Void>` to indicate when request handling is complete