Package org.apache.http.protocol
Class HttpRequestHandlerRegistry
- java.lang.Object
-
- org.apache.http.protocol.HttpRequestHandlerRegistry
-
- All Implemented Interfaces:
HttpRequestHandlerResolver
@Contract(threading=SAFE) @Deprecated public class HttpRequestHandlerRegistry extends java.lang.Object implements HttpRequestHandlerResolver
Deprecated.(4.3) useUriHttpRequestHandlerMapper
Maintains a map of HTTP request handlers keyed by a request URI pattern.
Patterns may have three formats:*
*<uri>
<uri>*
This class can be used to resolve an instance ofHttpRequestHandler
matching a particular request URI. Usually the resolved request handler will be used to process the request with the specified request URI.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description HttpRequestHandlerRegistry()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Map<java.lang.String,HttpRequestHandler>
getHandlers()
Deprecated.Get the handler map.HttpRequestHandler
lookup(java.lang.String requestURI)
Deprecated.Looks up a handler matching the given request URI.void
register(java.lang.String pattern, HttpRequestHandler handler)
Deprecated.Registers the givenHttpRequestHandler
as a handler for URIs matching the given pattern.void
setHandlers(java.util.Map<java.lang.String,HttpRequestHandler> map)
Deprecated.Sets handlers from the given map.void
unregister(java.lang.String pattern)
Deprecated.Removes registered handler, if exists, for the given pattern.
-
-
-
Method Detail
-
register
public void register(java.lang.String pattern, HttpRequestHandler handler)
Deprecated.Registers the givenHttpRequestHandler
as a handler for URIs matching the given pattern.- Parameters:
pattern
- the pattern to register the handler for.handler
- the handler.
-
unregister
public void unregister(java.lang.String pattern)
Deprecated.Removes registered handler, if exists, for the given pattern.- Parameters:
pattern
- the pattern to unregister the handler for.
-
setHandlers
public void setHandlers(java.util.Map<java.lang.String,HttpRequestHandler> map)
Deprecated.Sets handlers from the given map.- Parameters:
map
- the map containing handlers keyed by their URI patterns.
-
getHandlers
public java.util.Map<java.lang.String,HttpRequestHandler> getHandlers()
Deprecated.Get the handler map.- Returns:
- The map of handlers and their associated URI patterns.
- Since:
- 4.2
-
lookup
public HttpRequestHandler lookup(java.lang.String requestURI)
Deprecated.Description copied from interface:HttpRequestHandlerResolver
Looks up a handler matching the given request URI.- Specified by:
lookup
in interfaceHttpRequestHandlerResolver
- Parameters:
requestURI
- the request URI- Returns:
- HTTP request handler or
null
if no match is found.
-
-