org.jboss.virtual.spi.registry
Class VFSRegistry

java.lang.Object
  extended by org.jboss.virtual.spi.registry.VFSRegistry
Direct Known Subclasses:
DefaultVFSRegistry

public abstract class VFSRegistry
extends java.lang.Object

VFS registry.

Author:
Ales Justin

Constructor Summary
VFSRegistry()
           
 
Method Summary
abstract  void addContext(VFSContext context)
          Add new vfs context.
abstract  VFSContext getContext(java.net.URI uri)
          Get the context.
 VFSContext getContext(java.net.URL url)
          Get the context.
abstract  VirtualFile getFile(java.net.URI uri)
          Get the file.
 VirtualFile getFile(java.net.URL url)
          Get the file.
static VFSRegistry getInstance()
          Get an instance of vfs registry.
abstract  void removeContext(VFSContext context)
          Remove the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFSRegistry

public VFSRegistry()
Method Detail

getInstance

public static VFSRegistry getInstance()
Get an instance of vfs registry.

Returns:
the vfs registry instance

addContext

public abstract void addContext(VFSContext context)
Add new vfs context.

Parameters:
context - the context

removeContext

public abstract void removeContext(VFSContext context)
Remove the context.

Parameters:
context - the context

getContext

public abstract VFSContext getContext(java.net.URI uri)
                               throws java.io.IOException
Get the context.

Parameters:
uri - the uri to match
Returns:
matching context or null
Throws:
java.io.IOException - for any IO error

getContext

public VFSContext getContext(java.net.URL url)
                      throws java.io.IOException
Get the context.

Parameters:
url - the url to match
Returns:
matching context or null
Throws:
java.io.IOException - for any IO error

getFile

public abstract VirtualFile getFile(java.net.URI uri)
                             throws java.io.IOException
Get the file. Check the cache for cached entry, return null if no matching entry exists.

Parameters:
uri - the file's uri
Returns:
virtual file instance or null if it doesn't exist in cache
Throws:
java.io.IOException - for any error

getFile

public VirtualFile getFile(java.net.URL url)
                    throws java.io.IOException
Get the file. Check the cache for cached entry, return null if no matching entry exists.

Parameters:
url - the file's url
Returns:
virtual file instance or null if it doesn't exist in cache
Throws:
java.io.IOException - for any error