List of usage examples for org.springframework.web.reactive.function.server ServerRequest attributes
Map<String, Object> attributes();
From source file:org.springframework.cloud.function.web.function.FunctionEndpointInitializer.java
@SuppressWarnings("unchecked") private Function<Flux<?>, Flux<?>> extract(ServerRequest request) { Function<Flux<?>, Flux<?>> function; if (handler != null) { logger.info("Configured function: " + handler); Set<String> names = this.functionCatalog.getNames(Function.class); Assert.isTrue(names.contains(handler), "Cannot locate function: " + handler); function = this.functionCatalog.lookup(Function.class, handler); } else {//from ww w. j a v a2 s .c o m function = (Function<Flux<?>, Flux<?>>) FunctionWebUtils.findFunction(request.method(), functionCatalog, request.attributes(), request.path()); } return function; }