Top Description Fields Constructors Methods
org.jboss.modules

pack-priv final Class ModularURLStreamHandlerFactory

extends Object
implements URLStreamHandlerFactory
Class Inheritance
All Implemented Interfaces
java.net.URLStreamHandlerFactory
Imports
java.net.URLStreamHandler, .URLStreamHandlerFactory, java.security.AccessController, .PrivilegedAction, java.util.ArrayList, .List, .ServiceLoader, .Set, java.util.concurrent.CopyOnWriteArrayList

The root URL stream handler factory for the module system.
Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
pack-priv static final ModularURLStreamHandlerFactory
private static final List<Module>
private static final ThreadLocal<Set<String>>
private static final PrivilegedAction<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
public URLStreamHandler
createURLStreamHandler(final String
the protocol ("ftp", "http", "nntp", etc.).
protocol
)

Implements java.net.URLStreamHandlerFactory.createURLStreamHandler.

Creates a new URLStreamHandler instance with the specified protocol.
private URLStreamHandler
locateHandler(final String protocol)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final ModularURLStreamHandlerFactory INSTANCE
modulesback to summary
private static final List<Module> modules
reenteredback to summary
private static final ThreadLocal<Set<String>> reentered
URL_MODULES_LIST_ACTIONback to summary
private static final PrivilegedAction<String> URL_MODULES_LIST_ACTION

Constructor Detail

ModularURLStreamHandlerFactoryback to summary
private ModularURLStreamHandlerFactory()

Method Detail

addHandlerModuleback to summary
pack-priv static void addHandlerModule(Module module)
createURLStreamHandlerback to summary
public URLStreamHandler createURLStreamHandler(final String protocol)

Implements java.net.URLStreamHandlerFactory.createURLStreamHandler.

Doc from java.net.URLStreamHandlerFactory.createURLStreamHandler.

Creates a new URLStreamHandler instance with the specified protocol.

Parameters
protocol:String

the protocol ("ftp", "http", "nntp", etc.).

Returns:URLStreamHandler

a URLStreamHandler for the specific protocol, or null if this factory cannot create a handler for the specific protocol

locateHandlerback to summary
private URLStreamHandler locateHandler(final String protocol)