public class HttpRequestHandlerRegistry extends Object implements HttpRequestHandlerResolver
*
*<uri>
<uri>*
HttpRequestHandler
matching a particular request URI. Usually the
resolved request handler will be used to process the request with the
specified request URI.Constructor and Description |
---|
HttpRequestHandlerRegistry() |
Modifier and Type | Method and Description |
---|---|
HttpRequestHandler |
lookup(String requestURI)
Looks up a handler matching the given request URI.
|
protected boolean |
matchUriRequestPattern(String pattern,
String requestUri)
Deprecated.
|
void |
register(String pattern,
HttpRequestHandler handler)
Registers the given
HttpRequestHandler as a handler for URIs
matching the given pattern. |
void |
setHandlers(Map map)
Sets handlers from the given map.
|
void |
unregister(String pattern)
Removes registered handler, if exists, for the given pattern.
|
public void register(String pattern, HttpRequestHandler handler)
HttpRequestHandler
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.public void setHandlers(Map map)
map
- the map containing handlers keyed by their URI patterns.public HttpRequestHandler lookup(String requestURI)
HttpRequestHandlerResolver
lookup
in interface HttpRequestHandlerResolver
requestURI
- the request URInull
if no match
is found.Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.