|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.protocol.UriPatternMatcher<T>
@ThreadSafe public class UriPatternMatcher<T>
Maintains a map of objects keyed by a request URI pattern.
Patterns may have three formats:
**<uri><uri>*
| Constructor Summary | |
|---|---|
UriPatternMatcher()
|
|
| Method Summary | |
|---|---|
Map<String,T> |
getObjects()
Returns the objects map. |
T |
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,
T obj)
Registers the given object for URIs matching the given pattern. |
void |
setHandlers(Map<String,T> map)
Deprecated. (4.1) use setObjects(Map) |
void |
setObjects(Map<String,T> 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,
T obj)
pattern - the pattern to register the handler for.obj - the object.public void unregister(String pattern)
pattern - the pattern to unregister.@Deprecated public void setHandlers(Map<String,T> map)
setObjects(Map)
public void setObjects(Map<String,T> map)
map - the map containing objects keyed by their URI patterns.public Map<String,T> getObjects()
public T 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 | |||||||||