|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap
org.eclipse.jetty.http.PathMap
public class PathMap
URI path map to Object. This mapping implements the path specification recommended in the 2.2 Servlet API. Path specifications can be of the following forms:
/foo/bar - an exact path specification. /foo/* - a prefix path specification (must end '/*'). *.ext - a suffix path specification. / - the default path specification.Matching is performed in the following order
Special characters within paths such as ' and ';' are not treated specially as it is assumed they would have been either encoded in the original URL or stripped from the path.
This class is not synchronized. If concurrent modifications are possible then it should be synchronized at a higher level.
| 嵌套类摘要 | |
|---|---|
static class |
PathMap.Entry
|
| 从类 java.util.AbstractMap 继承的嵌套类/接口 |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| 构造方法摘要 | |
|---|---|
PathMap()
Construct empty PathMap. |
|
PathMap(boolean nodefault)
Construct empty PathMap. |
|
PathMap(int capacity)
Construct empty PathMap. |
|
PathMap(Map m)
Construct from dictionary PathMap. |
|
| 方法摘要 | |
|---|---|
void |
clear()
|
boolean |
containsMatch(String path)
Return whether the path matches any entries in the PathMap, excluding the default entry |
Object |
getLazyMatches(String path)
Get all entries matched by the path. |
PathMap.Entry |
getMatch(String path)
Get the entry mapped by the best specification. |
List |
getMatches(String path)
Get all entries matched by the path. |
Object |
match(String path)
Get object matched by the path. |
static boolean |
match(String pathSpec,
String path)
|
static boolean |
match(String pathSpec,
String path,
boolean noDefault)
|
static String |
pathInfo(String pathSpec,
String path)
Return the portion of a path that is after a path spec. |
static String |
pathMatch(String pathSpec,
String path)
Return the portion of a path that matches a path spec. |
Object |
put(Object pathSpec,
Object object)
Add a single path match to the PathMap. |
void |
readExternal(ObjectInput in)
|
static String |
relativePath(String base,
String pathSpec,
String path)
Relative path. |
Object |
remove(Object pathSpec)
|
static void |
setPathSpecSeparators(String s)
Set the path spec separator. |
void |
writeExternal(ObjectOutput out)
|
| 从类 java.util.HashMap 继承的方法 |
|---|
clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, size, values |
| 从类 java.util.AbstractMap 继承的方法 |
|---|
equals, hashCode, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| 从接口 java.util.Map 继承的方法 |
|---|
equals, hashCode |
| 构造方法详细信息 |
|---|
public PathMap()
public PathMap(boolean nodefault)
public PathMap(int capacity)
public PathMap(Map m)
| 方法详细信息 |
|---|
public static void setPathSpecSeparators(String s)
s - separators
public void writeExternal(ObjectOutput out)
throws IOException
Externalizable 中的 writeExternalIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
Externalizable 中的 readExternalIOException
ClassNotFoundException
public Object put(Object pathSpec,
Object object)
Map 中的 putHashMap 中的 putpathSpec - The path specification, or comma separated list of
path specifications.object - The object the path maps topublic Object match(String path)
path - the path.
public PathMap.Entry getMatch(String path)
path - the path.
public Object getLazyMatches(String path)
path - Path to match
public List getMatches(String path)
path - Path to match
public boolean containsMatch(String path)
path - Path to match
public Object remove(Object pathSpec)
Map 中的 removeHashMap 中的 removepublic void clear()
Map 中的 clearHashMap 中的 clear
public static boolean match(String pathSpec,
String path)
throws IllegalArgumentException
IllegalArgumentException
public static boolean match(String pathSpec,
String path,
boolean noDefault)
throws IllegalArgumentException
IllegalArgumentException
public static String pathMatch(String pathSpec,
String path)
public static String pathInfo(String pathSpec,
String path)
public static String relativePath(String base,
String pathSpec,
String path)
base - The base the path is relative to.pathSpec - The spec of the path segment to ignore.path - the additional path
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||