public abstract class HttpHandlerAdapterSupport extends Object
Provides support for delegating incoming requests to a single or multiple
HttpHandlers each mapped to a distinct context path. In either case
sub-classes simply use
getHttpHandler() to access the handler to
delegate incoming requests to.
|Constructor and Description|
Constructor with a single
|Modifier and Type||Method and Description|
protected final Log logger
public HttpHandlerAdapterSupport(HttpHandler httpHandler)
HttpHandlerto use for all requests.
httpHandler- the handler to use
public HttpHandlerAdapterSupport(Map<String,HttpHandler> handlerMap)
HttpHandlers mapped to distinct context paths. Context paths must start but not end with "/" and must be encoded.
At request time context paths are compared against the "raw" path of the request URI in the order in which they are provided. The first one to match is chosen. If none match the response status is set to 404.
handlerMap- map with context paths and