public class NettyRoutingFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
| Modifier and Type | Field and Description |
|---|---|
static int |
ORDER
The order of the NettyRoutingFilter.
|
| Constructor and Description |
|---|
NettyRoutingFilter(reactor.netty.http.client.HttpClient httpClient,
org.springframework.beans.factory.ObjectProvider<List<HttpHeadersFilter>> headersFiltersProvider,
HttpClientProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
filter(org.springframework.web.server.ServerWebExchange exchange,
GatewayFilterChain chain)
Process the Web request and (optionally) delegate to the next
WebFilter
through the given GatewayFilterChain. |
protected io.netty.buffer.ByteBuf |
getByteBuf(org.springframework.core.io.buffer.DataBuffer dataBuffer) |
List<HttpHeadersFilter> |
getHeadersFilters() |
protected reactor.netty.http.client.HttpClient |
getHttpClient(Route route,
org.springframework.web.server.ServerWebExchange exchange)
Creates a new HttpClient with per route timeout configuration.
|
int |
getOrder() |
public static final int ORDER
Ordered.LOWEST_PRECEDENCE.public NettyRoutingFilter(reactor.netty.http.client.HttpClient httpClient,
org.springframework.beans.factory.ObjectProvider<List<HttpHeadersFilter>> headersFiltersProvider,
HttpClientProperties properties)
public List<HttpHeadersFilter> getHeadersFilters()
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
GlobalFilterWebFilter
through the given GatewayFilterChain.filter in interface GlobalFilterexchange - the current server exchangechain - provides a way to delegate to the next filterMono<Void> to indicate when request processing is completeprotected io.netty.buffer.ByteBuf getByteBuf(org.springframework.core.io.buffer.DataBuffer dataBuffer)
protected reactor.netty.http.client.HttpClient getHttpClient(Route route, org.springframework.web.server.ServerWebExchange exchange)
route - the current route.exchange - the current ServerWebExchange.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.