Class simpleHandlerAdapter

java.lang.Object
org.springframework.web.reactive.result.simpleHandlerAdapter
All Implemented Interfaces:
HandlerAdapter

public class simpleHandlerAdapter extends Object implements HandlerAdapter
HandlerAdapter that allows using the plain WebHandler contract with the generic DispatcherHandler.
since:
5.0
Author:
Rossen stoyanchev, sebastien Deleuze
  • Constructor Details

    • simpleHandlerAdapter

      public simpleHandlerAdapter()
  • Method Details

    • supports

      public boolean supports(Object handler)
      Description copied from interface: HandlerAdapter
      Whether this HandlerAdapter supports the given handler.
      specified by:
      supports in interface HandlerAdapter
      Parameters:
      handler - the handler object to check
      Returns:
      whether the handler is supported
    • handle

      public&nbsp;Mono<HandlerResult>&nbsp;handle(serverWebExchange&nbsp;exchange, Object&nbsp;handler)
      Description copied from interface:&nbsp;HandlerAdapter
      Handle the request with the given handler, previously checked via HandlerAdapter.supports(Object).

      Implementations should consider the following for exception handling:

      • Handle invocation exceptions within this method.
      • set an exception handler on the returned HandlerResult to handle deferred exceptions from asynchronous return values, and to handle exceptions from response rendering.
      • Implement DispatchExceptionHandler to extend exception handling to exceptions that occur before a handler is selected.
      specified by:
      handle&nbsp;in interface&nbsp;HandlerAdapter
      Parameters:
      exchange - current server exchange
      handler - the selected handler which must have been previously checked via HandlerAdapter.supports(Object)
      Returns:
      Mono that emits a HandlerResult, or completes empty if the request is fully handled; any error signal would not be handled within the DispatcherHandler, and would instead be processed by the chain of registered WebExceptionHandlers at the end of the WebFilter chain