Class ReactiveLoadBalancerClientFilter
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.ReactiveLoadBalancerClientFilter
-
- All Implemented Interfaces:
GlobalFilter
,org.springframework.core.Ordered
public class ReactiveLoadBalancerClientFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
AGlobalFilter
implementation that routes requests using reactive Spring Cloud LoadBalancer.- Author:
- Spencer Gibb, Tim Ysewyn, Olga Maciaszek-Sharma
-
-
Field Summary
Fields Modifier and Type Field Description static int
LOAD_BALANCER_CLIENT_FILTER_ORDER
Order of filter.
-
Constructor Summary
Constructors Constructor Description ReactiveLoadBalancerClientFilter(org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory clientFactory, GatewayLoadBalancerProperties properties)
ReactiveLoadBalancerClientFilter(org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory clientFactory, GatewayLoadBalancerProperties properties, org.springframework.cloud.client.loadbalancer.LoadBalancerProperties loadBalancerProperties)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>
filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Process the Web request and (optionally) delegate to the nextGatewayFilter
through the givenGatewayFilterChain
.int
getOrder()
protected URI
reconstructURI(org.springframework.cloud.client.ServiceInstance serviceInstance, URI original)
-
-
-
Field Detail
-
LOAD_BALANCER_CLIENT_FILTER_ORDER
public static final int LOAD_BALANCER_CLIENT_FILTER_ORDER
Order of filter.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReactiveLoadBalancerClientFilter
@Deprecated public ReactiveLoadBalancerClientFilter(org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory clientFactory, GatewayLoadBalancerProperties properties, org.springframework.cloud.client.loadbalancer.LoadBalancerProperties loadBalancerProperties)
Deprecated.
-
ReactiveLoadBalancerClientFilter
public ReactiveLoadBalancerClientFilter(org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory clientFactory, GatewayLoadBalancerProperties properties)
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Description copied from interface:GlobalFilter
Process the Web request and (optionally) delegate to the nextGatewayFilter
through the givenGatewayFilterChain
.- Specified by:
filter
in interfaceGlobalFilter
- Parameters:
exchange
- the current server exchangechain
- provides a way to delegate to the next filter- Returns:
Mono<Void>
to indicate when request processing is complete
-
-