Java Doc for PathMap.java in  » Sevlet-Container » jetty-modules » org » mortbay » jetty » servlet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » jetty modules » org.mortbay.jetty.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.HashMap
   org.mortbay.jetty.servlet.PathMap

PathMap
public class PathMap extends HashMap implements Externalizable(Code)
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
  • Exact match.
  • Longest prefix match.
  • Longest suffix match.
  • default. Multiple path specifications can be mapped by providing a list of specifications. The list is separated by the characters specified in the "org.mortbay.http.PathMap.separators" System property, which defaults to :

    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.
    author:
       Greg Wilkins (gregw)


  • Inner Class :public static class Entry implements Map.Entry

    Field Summary
     Entry_default
        
     List_defaultSingletonList
        
     Set_entrySet
        
     StringMap_exactMap
        
     boolean_nodefault
        
     Entry_prefixDefault
        
     StringMap_prefixMap
        
     StringMap_suffixMap
        

    Constructor Summary
    public  PathMap()
         Construct empty PathMap.
    public  PathMap(boolean nodefault)
         Construct empty PathMap.
    public  PathMap(int capacity)
         Construct empty PathMap.
    public  PathMap(Map m)
         Construct from dictionary PathMap.

    Method Summary
    public  voidclear()
        
    public  ObjectgetLazyMatches(String path)
         Get all entries matched by the path.
    public  EntrygetMatch(String path)
         Get the entry mapped by the best specification.
    Parameters:
      path - the path.
    public  ListgetMatches(String path)
         Get all entries matched by the path.
    public  Objectmatch(String path)
         Get object matched by the path.
    Parameters:
      path - the path.
    public static  booleanmatch(String pathSpec, String path)
        
    public static  booleanmatch(String pathSpec, String path, boolean noDefault)
        
    public static  StringpathInfo(String pathSpec, String path)
         Return the portion of a path that is after a path spec.
    public static  StringpathMatch(String pathSpec, String path)
         Return the portion of a path that matches a path spec.
    public synchronized  Objectput(Object pathSpec, Object object)
         Add a single path match to the PathMap.
    public  voidreadExternal(java.io.ObjectInput in)
        
    public static  StringrelativePath(String base, String pathSpec, String path)
         Relative path.
    public synchronized  Objectremove(Object pathSpec)
        
    public static  voidsetPathSpecSeparators(String s)
         Set the path spec separator.
    public  voidwriteExternal(java.io.ObjectOutput out)
        

    Field Detail
    _default
    Entry _default(Code)



    _defaultSingletonList
    List _defaultSingletonList(Code)



    _entrySet
    Set _entrySet(Code)



    _exactMap
    StringMap _exactMap(Code)



    _nodefault
    boolean _nodefault(Code)



    _prefixDefault
    Entry _prefixDefault(Code)



    _prefixMap
    StringMap _prefixMap(Code)



    _suffixMap
    StringMap _suffixMap(Code)




    Constructor Detail
    PathMap
    public PathMap()(Code)
    Construct empty PathMap.



    PathMap
    public PathMap(boolean nodefault)(Code)
    Construct empty PathMap.



    PathMap
    public PathMap(int capacity)(Code)
    Construct empty PathMap.



    PathMap
    public PathMap(Map m)(Code)
    Construct from dictionary PathMap.




    Method Detail
    clear
    public void clear()(Code)



    getLazyMatches
    public Object getLazyMatches(String path)(Code)
    Get all entries matched by the path. Best match first.
    Parameters:
      path - Path to match LazyList of Map.Entry instances key=pathSpec



    getMatch
    public Entry getMatch(String path)(Code)
    Get the entry mapped by the best specification.
    Parameters:
      path - the path. Map.Entry of the best matched or null.



    getMatches
    public List getMatches(String path)(Code)
    Get all entries matched by the path. Best match first.
    Parameters:
      path - Path to match List of Map.Entry instances key=pathSpec



    match
    public Object match(String path)(Code)
    Get object matched by the path.
    Parameters:
      path - the path. Best matched object or null.



    match
    public static boolean match(String pathSpec, String path) throws IllegalArgumentException(Code)
    true if match.



    match
    public static boolean match(String pathSpec, String path, boolean noDefault) throws IllegalArgumentException(Code)
    true if match.



    pathInfo
    public static String pathInfo(String pathSpec, String path)(Code)
    Return the portion of a path that is after a path spec. The path info string



    pathMatch
    public static String pathMatch(String pathSpec, String path)(Code)
    Return the portion of a path that matches a path spec. null if no match at all.



    put
    public synchronized Object put(Object pathSpec, Object object)(Code)
    Add a single path match to the PathMap.
    Parameters:
      pathSpec - The path specification, or comma separated list ofpath specifications.
    Parameters:
      object - The object the path maps to



    readExternal
    public void readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException(Code)



    relativePath
    public static String relativePath(String base, String pathSpec, String path)(Code)
    Relative path.
    Parameters:
      base - The base the path is relative to.
    Parameters:
      pathSpec - The spec of the path segment to ignore.
    Parameters:
      path - the additional path base plus path with pathspec removed



    remove
    public synchronized Object remove(Object pathSpec)(Code)



    setPathSpecSeparators
    public static void setPathSpecSeparators(String s)(Code)
    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
    Parameters:
      s - separators



    writeExternal
    public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException(Code)



    Methods inherited from java.util.HashMap
    public void clear()(Code)(Java Doc)
    public Object clone()(Code)(Java Doc)
    public boolean containsKey(Object key)(Code)(Java Doc)
    public boolean containsValue(Object value)(Code)(Java Doc)
    public Set<Map.Entry<K, V>> entrySet()(Code)(Java Doc)
    public V get(Object key)(Code)(Java Doc)
    public boolean isEmpty()(Code)(Java Doc)
    public Set<K> keySet()(Code)(Java Doc)
    public V put(K key, V value)(Code)(Java Doc)
    public void putAll(Map<? extends K, ? extends V> m)(Code)(Java Doc)
    public V remove(Object key)(Code)(Java Doc)
    public int size()(Code)(Java Doc)
    public Collection<V> values()(Code)(Java Doc)

    www.java2java.com | Contact Us
    Copyright 2009 - 12 Demo Source and Support. All rights reserved.
    All other trademarks are property of their respective owners.