com.caucho.vfs
Class SchemeMap
java.lang.Object
|
+--com.caucho.vfs.SchemeMap
- public class SchemeMap
- extends java.lang.Object
The top-level filesystem schemes are collected into a single map.
The default scheme has a number of standard filesystems, file:, mailto:,
jndi:, http:.
Applications can add schemes in the configuration file. When first
accessed, the SchemeMap will look in the Registry to match the scheme.
If the new scheme exists, it will instantiate a single root instance and
use that for the remainder of the application.
<caucho.com>
<vfs scheme="foo" class-name="test.vfs.FooPath"/>
</caucho.com>
Constructor Summary |
SchemeMap()
Create an empty SchemeMap. |
Method Summary |
Path |
getScheme(java.lang.String scheme)
Returns the named root Path of the scheme, e.g. |
Path |
removeScheme(java.lang.String scheme)
Removes the named scheme from the top-level filesystem. |
void |
setScheme(java.lang.String scheme,
Path handler)
Sets the named root Path of the scheme. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemeMap
public SchemeMap()
- Create an empty SchemeMap. Normally, applications will never call this.
getScheme
public Path getScheme(java.lang.String scheme)
- Returns the named root Path of the scheme, e.g. for file:.
- Parameters:
scheme
- the scheme name for the selected path.- Returns:
- the named root or a NotFoundPath.
setScheme
public void setScheme(java.lang.String scheme,
Path handler)
- Sets the named root Path of the scheme.
- Parameters:
scheme
- name of the scheme.handler
- root Path for the scheme.
removeScheme
public Path removeScheme(java.lang.String scheme)
- Removes the named scheme from the top-level filesystem.
- Parameters:
scheme
- name of the scheme to remove.