Class LoadBalancerServiceInstanceCookieFilter
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.LoadBalancerServiceInstanceCookieFilter
-
- All Implemented Interfaces:
GlobalFilter,org.springframework.core.Ordered
public class LoadBalancerServiceInstanceCookieFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
AGlobalFilterthat allows passing the instanceId) of theServiceInstanceselected by theReactiveLoadBalancerClientFilterin a cookie.- Since:
- 3.0.2
- Author:
- Olga Maciaszek-Sharma
-
-
Constructor Summary
Constructors Constructor Description LoadBalancerServiceInstanceCookieFilter(org.springframework.cloud.client.loadbalancer.LoadBalancerProperties loadBalancerProperties)Deprecated.LoadBalancerServiceInstanceCookieFilter(org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory)
-
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 nextGatewayFilterthrough the givenGatewayFilterChain.intgetOrder()
-
-
-
Constructor Detail
-
LoadBalancerServiceInstanceCookieFilter
@Deprecated public LoadBalancerServiceInstanceCookieFilter(org.springframework.cloud.client.loadbalancer.LoadBalancerProperties loadBalancerProperties)
Deprecated.
-
LoadBalancerServiceInstanceCookieFilter
public LoadBalancerServiceInstanceCookieFilter(org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory)
-
-
Method Detail
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Description copied from interface:GlobalFilterProcess the Web request and (optionally) delegate to the nextGatewayFilterthrough the givenGatewayFilterChain.- Specified by:
filterin 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
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
-