org.jboss.virtual.plugins.context
Class AbstractContextFactory

java.lang.Object
  extended by org.jboss.virtual.plugins.context.AbstractContextFactory
All Implemented Interfaces:
VFSContextFactory
Direct Known Subclasses:
FileSystemContextFactory, JarContextFactory

public abstract class AbstractContextFactory
extends java.lang.Object
implements VFSContextFactory

Abstract context factory.

Author:
Ales Justin

Constructor Summary
protected AbstractContextFactory(java.lang.String... protocols)
           
 
Method Summary
protected static java.net.URI fromVFS(java.net.URI uri)
          Check if URI param is already VFS URI.
protected static java.net.URL fromVFS(java.net.URL url)
          Check if URL param is already VFS URL.
 java.lang.String[] getProtocols()
          Get the URL protocols/URI schemes this factory supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.virtual.spi.VFSContextFactory
getVFS, getVFS
 

Constructor Detail

AbstractContextFactory

protected AbstractContextFactory(java.lang.String... protocols)
Method Detail

getProtocols

public java.lang.String[] getProtocols()
Description copied from interface: VFSContextFactory
Get the URL protocols/URI schemes this factory supports

Specified by:
getProtocols in interface VFSContextFactory
Returns:
list of supported protocols.

fromVFS

protected static java.net.URL fromVFS(java.net.URL url)
                               throws java.net.MalformedURLException
Check if URL param is already VFS URL.

Parameters:
url - the url
Returns:
stripped url
Throws:
java.net.MalformedURLException - for any error

fromVFS

protected static java.net.URI fromVFS(java.net.URI uri)
                               throws java.net.URISyntaxException
Check if URI param is already VFS URI.

Parameters:
uri - the uri
Returns:
stripped uri
Throws:
java.net.URISyntaxException - for any error