public class HttpListenerRegistry.ServerAddressRequestHandlerRegistry extends Object
HttpListenerRegistry.Path structures for root (/), catch all (/*) and server (*)
requests.| Constructor and Description |
|---|
ServerAddressRequestHandlerRegistry() |
| Modifier and Type | Method and Description |
|---|---|
RequestHandlerManager |
addRequestHandler(ListenerRequestMatcher requestMatcher,
RequestHandler requestHandler)
Adds a handler to the specified path, analyzing the current
HttpListenerRegistry.Path structure to create new paths if necessary. |
RequestHandler |
findRequestHandler(HttpRequest request)
Navigates the current
HttpListenerRegistry.Path structure searching for possible handlers for the request path required, then checks
which one matches the request method as well. |
void |
removeRequestHandler(ListenerRequestMatcher requestMatcher)
Removes the request matcher path from the available ones.
|
public RequestHandlerManager addRequestHandler(ListenerRequestMatcher requestMatcher, RequestHandler requestHandler)
HttpListenerRegistry.Path structure to create new paths if necessary.requestMatcher - the matcher of paths and methods to userequestHandler - the handler for requests to addRequestHandlerManager for the added handler that allows enabling, disabling and disposing itpublic RequestHandler findRequestHandler(HttpRequest request)
HttpListenerRegistry.Path structure searching for possible handlers for the request path required, then checks
which one matches the request method as well. Handles availability, existence and permission as well.request - the received HttpRequestRequestHandlerpublic void removeRequestHandler(ListenerRequestMatcher requestMatcher)
HttpListenerRegistry.Path structure,
which will require explicit removal of the associated request handler via Path#removeRequestHandlerMatcherPair(RequestHandlerMatcherPair)
so that the tree-like structure prunes itself if necessary.requestMatcher - the matcher for requestsCopyright © 2003–2023 MuleSoft, Inc.. All rights reserved.