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 Object

VFS registry.

Author:
Ales Justin

Constructor Summary
VFSRegistry()
           
 
Method Summary
abstract  void addContext(VFSContext context)
          Add new vfs context.
abstract  VirtualFile getFile(URI uri)
          Get the file.
abstract  VirtualFile getFile(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

getFile

public abstract VirtualFile getFile(URI uri)
                             throws 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:
IOException - for any error

getFile

public abstract VirtualFile getFile(URL url)
                             throws 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:
IOException - for any error


Copyright © 2010 JBoss, A division of Red Hat, Inc. All Rights Reserved.