Example usage for org.springframework.web.reactive HandlerAdapter handle

List of usage examples for org.springframework.web.reactive HandlerAdapter handle

Introduction

In this page you can find the example usage for org.springframework.web.reactive HandlerAdapter handle.

Prototype

Mono<HandlerResult> handle(ServerWebExchange exchange, Object handler);

Source Link

Document

Handle the request with the given handler.

Usage

From source file:org.springframework.web.reactive.DispatcherHandler.java

private Mono<HandlerResult> invokeHandler(ServerWebExchange exchange, Object handler) {
    if (this.handlerAdapters != null) {
        for (HandlerAdapter handlerAdapter : this.handlerAdapters) {
            if (handlerAdapter.supports(handler)) {
                return handlerAdapter.handle(exchange, handler);
            }//from  w  w  w.j  a  va2s  .  c  o  m
        }
    }
    return Mono.error(new IllegalStateException("No HandlerAdapter: " + handler));
}