|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.protocol.UriPatternMatcher<T>
T - The type of registered objects.@Contract(threading=SAFE) 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 | |
|---|---|
Set<Map.Entry<String,T>> |
entrySet()
Returns a Set view of the mappings contained in this matcher. |
Map<String,T> |
getObjects()
Deprecated. (4.1) do not use |
T |
lookup(String path)
Looks up an object matching the given request path. |
protected boolean |
matchUriRequestPattern(String pattern,
String path)
Tests if the given request path 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) do not use |
void |
setObjects(Map<String,T> map)
Deprecated. (4.1) do not use |
String |
toString()
|
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, wait, wait, wait |
| Constructor Detail |
|---|
public UriPatternMatcher()
| Method Detail |
|---|
public Set<Map.Entry<String,T>> entrySet()
Set view of the mappings contained in this matcher.
Map.entrySet()
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)
@Deprecated public void setObjects(Map<String,T> map)
@Deprecated public Map<String,T> getObjects()
public T lookup(String path)
path - the request path
null if no match is found.
protected boolean matchUriRequestPattern(String pattern,
String path)
pattern - the patternpath - the request path
true if the request URI matches the pattern,
false otherwise.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||