/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 for get's. If concurrent modifications are possible then it should be synchronized at a higher level.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static String | |
| pack-priv PathMap. | |
| pack-priv List | |
| pack-priv Set | |
| pack-priv StringMap | |
| pack-priv boolean | |
| pack-priv PathMap. | |
| pack-priv StringMap | |
| pack-priv StringMap |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides java. Implements java. |
| public Object | Returns: LazyList of Map.Entry instances key=pathSpecPath to match path)Get all entries matched by the path. |
| public PathMap. | |
| public List | Returns: List of Map.Entry instances key=pathSpecPath to match path)Get all entries matched by the path. |
| private static boolean | |
| public Object | |
| public static boolean | |
| public static boolean | |
| public static String | |
| public static String | |
| public synchronized Object | put(Object
The path specification, or comma separated list of
path specifications. pathSpec, Object The object the path maps to object)Overrides java. Implements java. |
| public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Implements java. |
| public static String | Returns: base plus path with pathspec removedThe base the path is relative to. base, String The spec of the path segment to ignore. pathSpec, String the additional path path)Relative path. |
| public synchronized Object | remove(Object
key whose mapping is to be removed from the map pathSpec)Overrides java. Implements java. |
| public static void | |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Implements java. |
| __pathSpecSeparators | back to summary |
|---|---|
| private static String __pathSpecSeparators | |
| _default | back to summary |
|---|---|
| pack-priv PathMap. | |
| _defaultSingletonList | back to summary |
|---|---|
| pack-priv List<E> _defaultSingletonList | |
| _entrySet | back to summary |
|---|---|
| pack-priv Set<E> _entrySet | |
| _exactMap | back to summary |
|---|---|
| pack-priv StringMap _exactMap | |
| _nodefault | back to summary |
|---|---|
| pack-priv boolean _nodefault | |
| _prefixDefault | back to summary |
|---|---|
| pack-priv PathMap. | |
| _prefixMap | back to summary |
|---|---|
| pack-priv StringMap _prefixMap | |
| _suffixMap | back to summary |
|---|---|
| pack-priv StringMap _suffixMap | |
| PathMap | back to summary |
|---|---|
| public PathMap() Construct empty PathMap. | |
| PathMap | back to summary |
|---|---|
| public PathMap(boolean nodefault) Construct empty PathMap. | |
| PathMap | back to summary |
|---|---|
| public PathMap(int capacity) Construct empty PathMap. | |
| PathMap | back to summary |
|---|---|
| public PathMap(Map<K, V> m) Construct from dictionary PathMap. | |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the mappings from this map. The map will be empty after this call returns. | |
| getLazyMatches | back to summary |
|---|---|
| public Object getLazyMatches(String path) Get all entries matched by the path. Best match first. | |
| getMatch | back to summary |
|---|---|
| public PathMap. Get the entry mapped by the best specification. | |
| getMatches | back to summary |
|---|---|
| public List Get all entries matched by the path. Best match first. | |
| isPathWildcardMatch | back to summary |
|---|---|
| private static boolean isPathWildcardMatch(String pathSpec, String path) | |
| match | back to summary |
|---|---|
| public Object match(String path) Get object matched by the path. | |
| match | back to summary |
|---|---|
public static boolean match(String pathSpec, String path) throws IllegalArgumentException
| |
| match | back to summary |
|---|---|
public static boolean match(String pathSpec, String path, boolean noDefault) throws IllegalArgumentException
| |
| pathInfo | back to summary |
|---|---|
| public static String pathInfo(String pathSpec, String path) Return the portion of a path that is after a path spec.
| |
| pathMatch | back to summary |
|---|---|
| public static String pathMatch(String pathSpec, String path) Return the portion of a path that matches a path spec.
| |
| put | back to summary |
|---|---|
| public synchronized Object put(Object pathSpec, Object object) Overrides java. Implements java. Add a single path match to the PathMap.
| |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Implements java. Doc from java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| relativePath | back to summary |
|---|---|
| public static String relativePath(String base, String pathSpec, String path) Relative path. | |
| remove | back to summary |
|---|---|
| public synchronized Object remove(Object pathSpec) Overrides java. Implements java. Doc from java. Removes the mapping for the specified key from this map if present. | |
| setPathSpecSeparators | back to summary |
|---|---|
| public static void setPathSpecSeparators(String s) Set the path spec separator. Multiple path specification may be included in a single string if they are separated by the characters set in this string. The default value is ":," or whatever has been set by the system property org.mortbay.http.PathMap.separators
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Implements java. Doc from java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
| |
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private String | |
| private transient String | |
| private Object |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public String | |
| public Object | |
| pack-priv void | |
| public Object | setValue(Object
new value to be stored in this entry o)Implements java. |
| public String |
| key | back to summary |
|---|---|
| private Object key | |
| mapped | back to summary |
|---|---|
| private String mapped | |
| string | back to summary |
|---|---|
| private transient String string | |
| value | back to summary |
|---|---|
| private Object value | |
| Entry | back to summary |
|---|---|
| pack-priv Entry(Object key, Object value) | |
| getKey | back to summary |
|---|---|
| public Object getKey() Implements java. Doc from java. Returns the key corresponding to this entry.
| |
| getMapped | back to summary |
|---|---|
| public String getMapped() | |
| getValue | back to summary |
|---|---|
| public Object getValue() Implements java. Doc from java. Returns the value corresponding to this entry. If the mapping
has been removed from the backing map (by the iterator's
| |
| setMapped | back to summary |
|---|---|
| pack-priv void setMapped(String mapped) | |
| setValue | back to summary |
|---|---|
| public Object setValue(Object o) Implements java. Doc from java. Replaces the value corresponding to this entry with the specified
value (optional operation). (Writes through to the map.) The
behavior of this call is undefined if the mapping has already been
removed from the map (by the iterator's | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |