|
||||||||||
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 | |
---|---|
java.lang.Object |
lookup(java.lang.String requestURI)
Looks up an object matching the given request URI. |
protected boolean |
matchUriRequestPattern(java.lang.String pattern,
java.lang.String requestUri)
Tests if the given request URI matches the given pattern. |
void |
register(java.lang.String pattern,
java.lang.Object obj)
Registers the given object for URIs matching the given pattern. |
void |
setHandlers(java.util.Map map)
Deprecated. use setObjects(Map) |
void |
setObjects(java.util.Map map)
Sets objects from the given map. |
void |
unregister(java.lang.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(java.lang.String pattern, java.lang.Object obj)
pattern
- the pattern to register the handler for.obj
- the object.public void unregister(java.lang.String pattern)
pattern
- the pattern to unregister.public void setHandlers(java.util.Map map)
setObjects(Map)
public void setObjects(java.util.Map map)
map
- the map containing objects keyed by their URI patterns.public java.lang.Object lookup(java.lang.String requestURI)
requestURI
- the request URI
null
if no match is found.protected boolean matchUriRequestPattern(java.lang.String pattern, java.lang.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 |