Class FunctionRoutingFilter
java.lang.Object
org.springframework.cloud.gateway.filter.FunctionRoutingFilter
- All Implemented Interfaces:
GlobalFilter, org.springframework.core.Ordered
public class FunctionRoutingFilter
extends Object
implements GlobalFilter, org.springframework.core.Ordered
- Author:
- Spencer Gibb
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionFunctionRoutingFilter(org.springframework.cloud.function.context.FunctionCatalog functionCatalog, List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders, Set<MessageBodyEncoder> messageBodyEncoders) -
Method Summary
Modifier and TypeMethodDescriptionreactor.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()protected reactor.core.publisher.Mono<Void> processRequest(org.springframework.web.server.ServerWebExchange exchange, org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry.FunctionInvocationWrapper function, List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders, Map<String, MessageBodyEncoder> messageBodyEncoders)
-
Constructor Details
-
FunctionRoutingFilter
public FunctionRoutingFilter(org.springframework.cloud.function.context.FunctionCatalog functionCatalog, List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders, Set<MessageBodyEncoder> messageBodyEncoders)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
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
-
processRequest
protected reactor.core.publisher.Mono<Void> processRequest(org.springframework.web.server.ServerWebExchange exchange, org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry.FunctionInvocationWrapper function, List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders, Map<String, MessageBodyEncoder> messageBodyEncoders)
-