public class NettyRoutingFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
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 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.Ordered
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
GlobalFilter
WebFilter
through the given GatewayFilterChain
.filter
in interface GlobalFilter
exchange
- 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.chain
- the current GatewayFilterChain.Copyright © 2020 Pivotal Software, Inc.. All rights reserved.