Java Doc for HmuxPath.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » server » hmux » 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 » EJB Server resin 3.1.5 » resin » com.caucho.server.hmux 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.caucho.server.hmux.HmuxPath

HmuxPath
public class HmuxPath extends FilesystemPath (Code)
The HTTP scheme. Currently it supports GET and POST.

TODO: support WEBDAV, enabling the full Path API.


Inner Class :static class CacheEntry
Inner Class :static class ListHandler extends org.xml.sax.helpers.DefaultHandler

Field Summary
protected static  L10NL
    
protected static  LruCache<String, CacheEntry>_cache
    
protected  CacheEntry_cacheEntry
    
protected  String_host
    
protected  int_port
    
protected  String_query
    
protected  String_virtualHost
    

Constructor Summary
public  HmuxPath(String host, int port)
     Creates a new HTTP root path with a host and a port.
 HmuxPath(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)
     Creates a new HTTP sub path.

Method Summary
protected  PathcacheCopy()
    
public  booleancanRead()
     Returns true if the file is readable.
protected  HmuxPathcreate(String host, int port)
    
protected  HmuxPathcreate(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)
    
public  booleanequals(Object o)
     Overrides equals to test for equality with an HTTP path.
public  booleanexists()
     Returns true if the file exists.
public  PathfsWalk(String userPath, Map<String, Object> attributes, String uri)
     Scans the path portion of the URI, i.e.
protected  CacheEntrygetCache()
    
public  StringgetHost()
     Returns the host part of the url.
public  longgetLastModified()
     Returns the last modified time.
public  longgetLength()
    
public  intgetPort()
     Returns the port part of the url.
public  StringgetQuery()
     Returns the query string.
public  StringgetScheme()
     Returns the scheme, http.
public  StringgetURL()
     Returns a full URL for the path.
public  StringgetUserPath()
     Returns the user's path.
public  StringgetVirtualHost()
     Returns the virtual host, if any.
public  inthashCode()
     Returns a hashCode for the path.
public  booleanisDirectory()
     Returns the last modified time.
public  booleanisFile()
     Returns true if the file exists.
public  String[]list()
    
public  PathlookupImpl(String userPath, Map<String, Object> newAttributes)
     Overrides the default lookup to parse the host and port before parsing the path.
public  StreamImplopenReadImpl()
     Returns a read stream for a GET request.
public  StreamImplopenReadWriteImpl()
     Returns a read/write pair for a POST request.
protected  PathschemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset)
     Walk down the path starting from the portion immediately following the scheme.
public  StringtoString()
     Returns the string form of the http path.

Field Detail
L
protected static L10N L(Code)



_cache
protected static LruCache<String, CacheEntry> _cache(Code)



_cacheEntry
protected CacheEntry _cacheEntry(Code)



_host
protected String _host(Code)



_port
protected int _port(Code)



_query
protected String _query(Code)



_virtualHost
protected String _virtualHost(Code)




Constructor Detail
HmuxPath
public HmuxPath(String host, int port)(Code)
Creates a new HTTP root path with a host and a port.
Parameters:
  host - the target host
Parameters:
  port - the target port, if zero, uses port 80.



HmuxPath
HmuxPath(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)(Code)
Creates a new HTTP sub path.
Parameters:
  root - the HTTP filesystem root
Parameters:
  userPath - the argument to the calling lookup()
Parameters:
  newAttributes - any attributes passed to http
Parameters:
  path - the full normalized path
Parameters:
  query - any query string




Method Detail
cacheCopy
protected Path cacheCopy()(Code)



canRead
public boolean canRead()(Code)
Returns true if the file is readable.



create
protected HmuxPath create(String host, int port)(Code)



create
protected HmuxPath create(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)(Code)



equals
public boolean equals(Object o)(Code)
Overrides equals to test for equality with an HTTP path.



exists
public boolean exists()(Code)
Returns true if the file exists.



fsWalk
public Path fsWalk(String userPath, Map<String, Object> attributes, String uri)(Code)
Scans the path portion of the URI, i.e. everything after the host and port.
Parameters:
  userPath - the user's supplied path
Parameters:
  attributes - the attributes for the new path
Parameters:
  uri - the full uri for the new path. the found path.



getCache
protected CacheEntry getCache()(Code)



getHost
public String getHost()(Code)
Returns the host part of the url.



getLastModified
public long getLastModified()(Code)
Returns the last modified time.



getLength
public long getLength()(Code)
Returns the file's length



getPort
public int getPort()(Code)
Returns the port part of the url.



getQuery
public String getQuery()(Code)
Returns the query string.



getScheme
public String getScheme()(Code)
Returns the scheme, http.



getURL
public String getURL()(Code)
Returns a full URL for the path.



getUserPath
public String getUserPath()(Code)
Returns the user's path.



getVirtualHost
public String getVirtualHost()(Code)
Returns the virtual host, if any.



hashCode
public int hashCode()(Code)
Returns a hashCode for the path.



isDirectory
public boolean isDirectory()(Code)
Returns the last modified time.



isFile
public boolean isFile()(Code)
Returns true if the file exists.



list
public String[] list() throws IOException(Code)
The contents of this directory or null if the path does notrefer to a directory.



lookupImpl
public Path lookupImpl(String userPath, Map<String, Object> newAttributes)(Code)
Overrides the default lookup to parse the host and port before parsing the path.
Parameters:
  userPath - the path passed in by the user
Parameters:
  newAttributes - attributes passed by the user the final path.



openReadImpl
public StreamImpl openReadImpl() throws IOException(Code)
Returns a read stream for a GET request.



openReadWriteImpl
public StreamImpl openReadWriteImpl() throws IOException(Code)
Returns a read/write pair for a POST request.



schemeWalk
protected Path schemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset)(Code)
Walk down the path starting from the portion immediately following the scheme. i.e. schemeWalk is responsible for parsing the host and port from the URL.
Parameters:
  userPath - the user's passed in path
Parameters:
  attributes - the attributes for the new path
Parameters:
  uri - the normalized full uri
Parameters:
  offset - offset into the uri to start processing, i.e. after thescheme. the looked-up path.



toString
public String toString()(Code)
Returns the string form of the http path.



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