org.inria.ns.reflex.modules.io.web
Class WebFileSystemConfigBuilder

java.lang.Object
  extended by org.apache.commons.vfs.FileSystemConfigBuilder
      extended by org.inria.ns.reflex.modules.io.web.WebFileSystemConfigBuilder

public class WebFileSystemConfigBuilder
extends FileSystemConfigBuilder

The config builder for Web applications. Several Web applications can be registered and retrieved concurrently. Each servlet that intend to use the web scheme must invoke registerWebapp(ServletContext) before for each HTTP request to serve, and in the init() method.

Author:
Philippe Poulard

Method Summary
static WebFileSystemConfigBuilder getInstance()
          Return the WebFileSystemConfigBuilder singleton.
 ServletContext getWebapp()
          Return the web application in use.
static void registerWebapp(ServletContext context)
          Registers the current web application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WebFileSystemConfigBuilder getInstance()
Return the WebFileSystemConfigBuilder singleton.

Returns:
The WebFileSystemConfigBuilder singleton.

registerWebapp

public static void registerWebapp(ServletContext context)
Registers the current web application. Several concurrent calls may be done safely.

Parameters:
context - The web application to register.

getWebapp

public ServletContext getWebapp()
Return the web application in use.

Returns:
The web application in use, or null.