Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.virtual.spi
Class VFSContextFactoryLocator

    java.lang.Object
      org.jboss.virtual.spi.VFSContextFactoryLocator

    public class VFSContextFactoryLocator

extends java.lang.Object

A singleton factory for locating VFSContextFactory instances given VFS root URIs.

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

Field Summary
`static java.lang.String` | `DEFAULT_FACTORY_PROPERTY` The system property that defines the default file factory
`static java.lang.String` | `SERVICES_PATH` The path used to load services from the classpath

Constructor Summary
`VFSContextFactoryLocator()`

Method Summary
`static VFSContextFactory` | `getFactory(java.net.URI rootURI)` Return the VFSContextFactory for the VFS mount point specified by the rootURI.
`static VFSContextFactory` | `getFactory(java.net.URL rootURL)` Return the VFSContextFactory for the VFS mount point specified by the rootURL.
`static void` | `registerFactory(VFSContextFactory factory)` Register a new VFSContextFactory
`static boolean` | `unregisterFactory(VFSContextFactory factory)` Unregister a VFSContextFactory

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_FACTORY_PROPERTY

    public static final java.lang.String DEFAULT_FACTORY_PROPERTY

  The system property that defines the default file factory

### SERVICES_PATH

    public static final java.lang.String SERVICES_PATH

  The path used to load services from the classpath

Constructor Detail

### VFSContextFactoryLocator

    public VFSContextFactoryLocator()

Method Detail

### registerFactory

    public static void registerFactory(VFSContextFactory factory)

  Register a new VFSContextFactory

  Parameters:
    `factory` - the factory
  Throws:
    `java.lang.IllegalArgumentException` - if the factory is null or the factory returns a null or no protocols
    `java.lang.IllegalStateException` - if one of the protocols is already registered

### unregisterFactory

    public static boolean unregisterFactory(VFSContextFactory factory)

  Unregister a VFSContextFactory

  Parameters:
    `factory` - the factory
  Returns:
    false when not registered
  Throws:
    `java.lang.IllegalArgumentException` - if the factory is null

### getFactory

    public static VFSContextFactory getFactory(java.net.URL rootURL)

  Return the VFSContextFactory for the VFS mount point specified by the rootURL.

  Parameters:
    `rootURL` - - the URL to a VFS root
  Returns:
    the VFSContextFactory capable of handling the rootURL. This will be null if there is no factory registered for the rootURL protocol.
  Throws:
    `java.lang.IllegalArgumentException` - if the rootURL is null

### getFactory

    public static VFSContextFactory getFactory(java.net.URI rootURI)

  Return the VFSContextFactory for the VFS mount point specified by the rootURI.

  Parameters:
    `rootURI` - - the URI to a VFS root
  Returns:
    the VFSContextFactory capable of handling the rootURI. This will be null if there is no factory registered for the rootURI scheme.
  Throws:
    `java.lang.IllegalArgumentException` - if the rootURI is null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD