Package org.apache.http.protocol
Class UriPatternMatcher<T>
java.lang.Object
org.apache.http.protocol.UriPatternMatcher<T>
- Type Parameters:
T- The type of registered objects.
Maintains a map of objects keyed by a request URI pattern.
Patterns may have three formats:
This class can be used to resolve an object matching a particular request URI.
Patterns may have three formats:
**<uri><uri>*
This class can be used to resolve an object matching a particular request URI.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentrySet()Returns aSetview of the mappings contained in this matcher.Deprecated.(4.1) do not useLooks up an object matching the given request path.protected booleanmatchUriRequestPattern(String pattern, String path) Tests if the given request path matches the given pattern.voidRegisters the given object for URIs matching the given pattern.voidsetHandlers(Map<String, T> map) Deprecated.(4.1) do not usevoidsetObjects(Map<String, T> map) Deprecated.(4.1) do not usetoString()voidunregister(String pattern) Removes registered object, if exists, for the given pattern.
-
Field Details
-
map
-
-
Constructor Details
-
UriPatternMatcher
public UriPatternMatcher()
-
-
Method Details
-
entrySet
Returns aSetview of the mappings contained in this matcher.- Returns:
- a set view of the mappings contained in this matcher.
- Since:
- 4.4.9
- See Also:
-
register
Registers the given object for URIs matching the given pattern.- Parameters:
pattern- the pattern to register the handler for.obj- the object.
-
unregister
Removes registered object, if exists, for the given pattern.- Parameters:
pattern- the pattern to unregister.
-
setHandlers
Deprecated.(4.1) do not use -
setObjects
Deprecated.(4.1) do not use -
getObjects
Deprecated.(4.1) do not use -
lookup
Looks up an object matching the given request path.- Parameters:
path- the request path- Returns:
- object or
nullif no match is found.
-
matchUriRequestPattern
Tests if the given request path matches the given pattern.- Parameters:
pattern- the patternpath- the request path- Returns:
trueif the request URI matches the pattern,falseotherwise.
-
toString
-