org.jboss.virtual.spi
Interface VFSContext

All Known Implementing Classes:
AbstractVFSContext, AssembledContext, FileSystemContext, JarContext, MemoryContext

public interface VFSContext

A virtual file context

Version:
$Revision: 55466 $
Author:
Scott.Stark@jboss.org, adrian@jboss.org

Method Summary
 VirtualFileHandler getChild(VirtualFileHandler parent, String path)
          Get a child
 List<VirtualFileHandler> getChildren(VirtualFileHandler parent, boolean ignoreErrors)
          Get the children
 Map<String,String> getOptions()
          Get the context option settings
 VirtualFileHandler getRoot()
          Return the root virtual file
 URI getRootURI()
          Get the root uri
 VFS getVFS()
          Get the VFS for this context
 void visit(VirtualFileHandler handler, VirtualFileHandlerVisitor visitor)
          Visit the virtual file system
 

Method Detail

getRootURI

URI getRootURI()
Get the root uri

Returns:
the root uri

getVFS

VFS getVFS()
Get the VFS for this context

Returns:
the vfs

getRoot

VirtualFileHandler getRoot()
                           throws IOException
Return the root virtual file

Returns:
the root
Throws:
IOException - for any problem accessing the VFS

getOptions

Map<String,String> getOptions()
Get the context option settings

Returns:
a map of the context options

getChildren

List<VirtualFileHandler> getChildren(VirtualFileHandler parent,
                                     boolean ignoreErrors)
                                     throws IOException
Get the children

Parameters:
parent - the parent
ignoreErrors - whether to ignore errors
Returns:
the children
Throws:
IOException - for any problem accessing the VFS
IllegalArgumentException - for a null parent

getChild

VirtualFileHandler getChild(VirtualFileHandler parent,
                            String path)
                            throws IOException
Get a child

Parameters:
parent - the parent
path - the path
Returns:
the child or null if not found
Throws:
IOException - for any problem accessing the VFS
IllegalArgumentException - for a null parent or name

visit

void visit(VirtualFileHandler handler,
           VirtualFileHandlerVisitor visitor)
           throws IOException
Visit the virtual file system

Parameters:
handler - the reference handler
visitor - the visitor
Throws:
IOException - for any error
IllegalArgumentException - if the handler or visitor is null


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