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 |
|---|---|
org.mule.runtime.http.api.server.RequestHandlerManager |
addRequestHandler(org.mule.runtime.http.api.server.PathAndMethodRequestMatcher requestMatcher,
org.mule.runtime.http.api.server.RequestHandler requestHandler)
Adds a handler to the specified path, analyzing the current
HttpListenerRegistry.Path structure to create new paths if necessary. |
org.mule.runtime.http.api.server.RequestHandler |
findRequestHandler(org.mule.runtime.http.api.domain.message.request.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(org.mule.runtime.http.api.server.PathAndMethodRequestMatcher requestMatcher)
Removes the request matcher path from the available ones.
|
public org.mule.runtime.http.api.server.RequestHandlerManager addRequestHandler(org.mule.runtime.http.api.server.PathAndMethodRequestMatcher requestMatcher,
org.mule.runtime.http.api.server.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 org.mule.runtime.http.api.server.RequestHandler findRequestHandler(org.mule.runtime.http.api.domain.message.request.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(org.mule.runtime.http.api.server.PathAndMethodRequestMatcher 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–2018 MuleSoft, Inc.. All rights reserved.