public class HttpListenerRegistry extends Object implements RequestHandlerProvider
| Modifier and Type | Class and Description |
|---|---|
class |
HttpListenerRegistry.Path
Represents a URI path, which can be a parent to regular sub paths, a catch all sub path (/*) and a URI param path (/{param}).
|
class |
HttpListenerRegistry.RequestHandlerMatcherPair
Association of a
RequestHandler and a ListenerRequestMatcher as they were introduced, which allows a joint
view and availability handling. |
class |
HttpListenerRegistry.ServerAddressRequestHandlerRegistry
Registry of handlers for a server, which maintains
HttpListenerRegistry.Path structures for root (/), catch all (/*) and server (*)
requests. |
| Constructor and Description |
|---|
HttpListenerRegistry() |
| Modifier and Type | Method and Description |
|---|---|
RequestHandlerManager |
addRequestHandler(Server server,
RequestHandler requestHandler,
ListenerRequestMatcher requestMatcher)
Introduces a new
RequestHandler for requests matching a given ListenerRequestMatcher in the provided
Server. |
RequestHandler |
getRequestHandler(String ip,
int port,
HttpRequest request)
Retrieves a RequestHandler to handle the http request
|
public RequestHandlerManager addRequestHandler(Server server, RequestHandler requestHandler, ListenerRequestMatcher requestMatcher)
RequestHandler for requests matching a given ListenerRequestMatcher in the provided
Server.server - where the handler should be addedrequestHandler - the handler to addrequestMatcher - the matcher to be applied for the handlerRequestHandlerManager for the added handler that allows enabling, disabling and disposing itpublic RequestHandler getRequestHandler(String ip, int port, HttpRequest request)
RequestHandlerProvidergetRequestHandler in interface RequestHandlerProviderip - ip address in which the http request was madeport - port in which the http request was maderequest - the http request contentCopyright © 2003–2023 MuleSoft, Inc.. All rights reserved.