org.millscript.commons.vfs.protocols
Class AbstractURISchemeHandler

java.lang.Object
  extended by org.millscript.commons.vfs.protocols.AbstractURISchemeHandler
All Implemented Interfaces:
URISchemeHandler
Direct Known Subclasses:
FileSchemeHandler, FtpSchemeHandler, HttpSchemeHandler

public abstract class AbstractURISchemeHandler
extends java.lang.Object
implements URISchemeHandler

This class provides a base for other implementations of the URISchemeHandler interface.


Constructor Summary
protected AbstractURISchemeHandler(VFS v)
          Constructs a new URI scheme handler for the specified VFS.
 
Method Summary
 VFS getParentVFS()
          Returns the parent VFS, that which created this URI scheme handler.
 void validate(java.net.URI uri)
          Validates the specified URI to see if it is suitable for resolving into a VFS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.millscript.commons.vfs.protocols.URISchemeHandler
resolveAsFile, resolveAsFolder, resolveAsVolume
 

Constructor Detail

AbstractURISchemeHandler

protected AbstractURISchemeHandler(VFS v)
Constructs a new URI scheme handler for the specified VFS.

Parameters:
v - the VFS for this handler
Method Detail

getParentVFS

public VFS getParentVFS()
Description copied from interface: URISchemeHandler
Returns the parent VFS, that which created this URI scheme handler. The parent VFS is maintained through to each volume, so that we can use it for configuration.

Specified by:
getParentVFS in interface URISchemeHandler
Returns:
See Also:
URISchemeHandler.getParentVFS()

validate

public final void validate(java.net.URI uri)
Validates the specified URI to see if it is suitable for resolving into a VFS. In the context of resolving a new virtual file, folder or volume the URI is considered valid if it is absolute but not opaque. This means that the URI has a scheme part and the scheme-specific part begins with a slash.

Parameters:
uri - the URI to validate


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.