Class ContextPathCompositeHandler
- java.lang.Object
- org.springframework.http.server.reactive.ContextPathCompositeHandler
- All Implemented Interfaces:
HttpHandler
public class ContextPathCompositeHandler extends Object implements HttpHandler
HttpHandlerdelegating requests to one of severalHttpHandler'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 viaServerHttpRequest.getPath().- Since:
- 5.0
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description ContextPathCompositeHandler(Map<String,? extends HttpHandler> handlerMap)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>handle(ServerHttpRequest request, ServerHttpResponse response)Handle the given request and write to the response.
Constructor Detail
ContextPathCompositeHandler
public ContextPathCompositeHandler(Map<String,? extends HttpHandler> handlerMap)
Method Detail
handle
public reactor.core.publisher.Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response)
Description copied from interface:HttpHandlerHandle the given request and write to the response.- Specified by:
handlein interfaceHttpHandler- Parameters:
request- current requestresponse- current response- Returns:
- indicates completion of request handling