@Contract(threading=SAFE) public class UriHttpAsyncRequestHandlerMapper extends Object implements HttpAsyncRequestHandlerMapper
*
*<uri>
<uri>*
HttpAsyncRequestHandler
matching a particular request URI. Usually the mapped request handler
will be used to process the request with the specified request URI.Modifier | Constructor and Description |
---|---|
|
UriHttpAsyncRequestHandlerMapper() |
protected |
UriHttpAsyncRequestHandlerMapper(UriPatternMatcher<HttpAsyncRequestHandler<?>> matcher) |
Modifier and Type | Method and Description |
---|---|
protected String |
getRequestPath(HttpRequest request)
Extracts request path from the given
HttpRequest |
UriPatternMatcher<HttpAsyncRequestHandler<?>> |
getUriPatternMatcher()
Gets the pattern matcher.
|
HttpAsyncRequestHandler<?> |
lookup(HttpRequest request)
Looks up a handler matching the given request URI.
|
void |
register(String pattern,
HttpAsyncRequestHandler<?> handler)
Registers the given
HttpAsyncRequestHandler as a handler for URIs
matching the given pattern. |
String |
toString() |
void |
unregister(String pattern)
Removes registered handler, if exists, for the given pattern.
|
protected UriHttpAsyncRequestHandlerMapper(UriPatternMatcher<HttpAsyncRequestHandler<?>> matcher)
public UriHttpAsyncRequestHandlerMapper()
public UriPatternMatcher<HttpAsyncRequestHandler<?>> getUriPatternMatcher()
public void register(String pattern, HttpAsyncRequestHandler<?> handler)
HttpAsyncRequestHandler
as a handler for URIs
matching the given pattern.pattern
- the pattern to register the handler for.handler
- the handler.public void unregister(String pattern)
pattern
- the pattern to unregister the handler for.protected String getRequestPath(HttpRequest request)
HttpRequest
public HttpAsyncRequestHandler<?> lookup(HttpRequest request)
lookup
in interface HttpAsyncRequestHandlerMapper
request
- the requestnull
if no match is found.Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.