@ThreadSafe public class UriPatternMatcher<T> extends Object
*
*<uri>
<uri>*
Constructor and Description |
---|
UriPatternMatcher() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 URInull
if no match is found.Copyright © 2005-2015 The Apache Software Foundation. All Rights Reserved.