|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.protocol.HttpRequestHandlerRegistry
public class HttpRequestHandlerRegistry
Maintains a map of HTTP request handlers keyed by a request URI pattern.
Patterns may have three formats:
*
*<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 Summary | |
---|---|
HttpRequestHandlerRegistry()
|
Method Summary | |
---|---|
HttpRequestHandler |
lookup(java.lang.String requestURI)
Looks up a handler matching the given request URI. |
protected boolean |
matchUriRequestPattern(java.lang.String pattern,
java.lang.String requestUri)
Deprecated. |
void |
register(java.lang.String pattern,
HttpRequestHandler handler)
Registers the given HttpRequestHandler as a handler for URIs
matching the given pattern. |
void |
setHandlers(java.util.Map map)
Sets handlers from the given map. |
void |
unregister(java.lang.String pattern)
Removes registered handler, if exists, for the given pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpRequestHandlerRegistry()
Method Detail |
---|
public void register(java.lang.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(java.lang.String pattern)
pattern
- the pattern to unregister the handler for.public void setHandlers(java.util.Map map)
map
- the map containing handlers keyed by their URI patterns.public HttpRequestHandler lookup(java.lang.String requestURI)
HttpRequestHandlerResolver
lookup
in interface HttpRequestHandlerResolver
requestURI
- the request URI
null
if no match
is found.protected boolean matchUriRequestPattern(java.lang.String pattern, java.lang.String requestUri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |