|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.protocol.UriPatternMatcher
public class UriPatternMatcher
Maintains a map of objects keyed by a request URI pattern.
Patterns may have three formats:
*
*<uri>
<uri>*
Constructor Summary | |
---|---|
UriPatternMatcher()
|
Method Summary | |
---|---|
Object |
lookup(String requestURI)
Looks up an object matching the given request URI. |
protected boolean |
matchUriRequestPattern(String pattern,
String requestUri)
Tests if the given request URI matches the given pattern. |
void |
register(String pattern,
Object obj)
Registers the given object for URIs matching the given pattern. |
void |
setHandlers(Map map)
Sets objects from the given map. |
void |
unregister(String pattern)
Removes registered object, 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 UriPatternMatcher()
Method Detail |
---|
public void register(String pattern, Object obj)
pattern
- the pattern to register the handler for.obj
- the object.public void unregister(String pattern)
pattern
- the pattern to unregister.public void setHandlers(Map map)
map
- the map containing objects keyed by their URI patterns.
public Object lookup(String requestURI)
requestURI
- the request URI
null
if no match is found.protected boolean matchUriRequestPattern(String pattern, String requestUri)
pattern
- the patternrequestUri
- the request URI
true
if the request URI matches the pattern,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |