Class ContextPathCompositeHandler

java.lang.Object
org.springframework.http.server.reactive.ContextPathCompositeHandler
All Implemented Interfaces:
HttpHandler

public class ContextPathCompositeHandler extends Object implements HttpHandler
HttpHandler delegating requests to one of several HttpHandler's based on simple, prefix-based mappings.

This is intended as a coarse-grained mechanism for delegating requests to one of several applications -- each represented by an HttpHandler, with the application "context path" (the prefix-based mapping) exposed via serverHttpRequest.getPath().

since:
5.0
Author:
Rossen stoyanchev
  • Constructor Details

    • ContextPathCompositeHandler

      public&nbsp;ContextPathCompositeHandler(Map<string, ? extends HttpHandler>&nbsp;handlerMap)
  • Method Details

    • handle

      public&nbsp;Mono<Void>&nbsp;handle(serverHttpRequest&nbsp;request, serverHttpResponse&nbsp;response)
      Description copied from interface:&nbsp;HttpHandler
      Handle the given request and write to the response.
      specified by:
      handle&nbsp;in interface&nbsp;HttpHandler
      Parameters:
      request - current request
      response - current response
      Returns:
      indicates completion of request handling