|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.net.protocol.URLStreamHandlerFactory
A factory for loading URL protocol handlers. This is based on Sun's URL mechanism, in that Handler classes will be searched for in the packages specified by the java.protocol.handler.pkgs property are searched for classes matching the protocol + ".Handler" classname. The default JBoss package "org.jboss.net.protocol" is searched even if not specified in the java.protocol.handler.pkgs property.
This factory is installed by the default server implementaion to ensure that protocol handlers not in the system classpath are located. The thread context class is used first followed by the Class.forName method.
Use preload
to force the URL handler map to load the
handlers for each protocol listed in PROTOCOLS
.
Field Summary | |
static String |
PACKAGE_PREFIX
The package prefix where JBoss protocol handlers live. |
static String[] |
PROTOCOLS
A list of JBoss specific protocols for preloading. |
Constructor Summary | |
URLStreamHandlerFactory()
|
Method Summary | |
static void |
clear()
Clear the current protocol to handler map. |
URLStreamHandler |
createURLStreamHandler(String protocol)
Search the handlerPkgs for URLStreamHandler classes matching the pkg + protocol + ".Handler" naming convention. |
static void |
preload()
Preload the JBoss specific protocol handlers, so that URL knows about them even if the handler factory is changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PACKAGE_PREFIX
public static final String[] PROTOCOLS
Constructor Detail |
public URLStreamHandlerFactory()
Method Detail |
public static void preload()
public static void clear()
public URLStreamHandler createURLStreamHandler(String protocol)
createURLStreamHandler
in interface URLStreamHandlerFactory
protocol
- The protocol to create a stream handler for
#checkHandlerPkgs()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |