@Contract(threading=SAFE) public class UriHttpAsyncRequestHandlerMapper extends java.lang.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(org.apache.http.protocol.UriPatternMatcher<HttpAsyncRequestHandler<?>> matcher) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getRequestPath(org.apache.http.HttpRequest request)
Extracts request path from the given
HttpRequest |
org.apache.http.protocol.UriPatternMatcher<HttpAsyncRequestHandler<?>> |
getUriPatternMatcher()
Gets the pattern matcher.
|
HttpAsyncRequestHandler<?> |
lookup(org.apache.http.HttpRequest request)
Looks up a handler matching the given request URI.
|
void |
register(java.lang.String pattern,
HttpAsyncRequestHandler<?> handler)
Registers the given
HttpAsyncRequestHandler as a handler for URIs
matching the given pattern. |
java.lang.String |
toString() |
void |
unregister(java.lang.String pattern)
Removes registered handler, if exists, for the given pattern.
|
protected UriHttpAsyncRequestHandlerMapper(org.apache.http.protocol.UriPatternMatcher<HttpAsyncRequestHandler<?>> matcher)
public UriHttpAsyncRequestHandlerMapper()
public org.apache.http.protocol.UriPatternMatcher<HttpAsyncRequestHandler<?>> getUriPatternMatcher()
public void register(java.lang.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(java.lang.String pattern)
pattern - the pattern to unregister the handler for.protected java.lang.String getRequestPath(org.apache.http.HttpRequest request)
HttpRequestpublic java.lang.String toString()
toString in class java.lang.Objectpublic HttpAsyncRequestHandler<?> lookup(org.apache.http.HttpRequest request)
lookup in interface HttpAsyncRequestHandlerMapperrequest - the requestnull if no match is found.