public class TomcatURLStreamHandlerFactory
extends java.lang.Object
implements java.net.URLStreamHandlerFactory
Modifier and Type | Method and Description |
---|---|
void |
addUserFactory(java.net.URLStreamHandlerFactory factory)
Since the JVM only allows a single call to
URL.setURLStreamHandlerFactory(URLStreamHandlerFactory) and
Tomcat needs to register a handler, provide a mechanism to allow
applications to register their own handlers. |
java.net.URLStreamHandler |
createURLStreamHandler(java.lang.String protocol) |
static boolean |
disable()
Prevent this this factory from registering with the JVM.
|
static TomcatURLStreamHandlerFactory |
getInstance()
Obtain a reference to the singleton instance.
|
boolean |
isRegistered() |
static boolean |
register()
Register this factory with the JVM.
|
static void |
release(java.lang.ClassLoader classLoader)
Release references to any user provided factories that have been loaded
using the provided class loader.
|
public static TomcatURLStreamHandlerFactory getInstance()
isRegistered()
before using the
returned instance.public static boolean register()
true
if the factory is already registered with the
JVM or was successfully registered as a result of this call.
false
if the factory was disabled prior to this
call.public static boolean disable()
true
if the factory is already disabled or was
successfully disabled as a result of this call.
false
if the factory was already registered prior
to this call.public static void release(java.lang.ClassLoader classLoader)
classLoader
- The class loader to releasepublic boolean isRegistered()
public void addUserFactory(java.net.URLStreamHandlerFactory factory)
URL.setURLStreamHandlerFactory(URLStreamHandlerFactory)
and
Tomcat needs to register a handler, provide a mechanism to allow
applications to register their own handlers.factory
- The user provided factory to add to the factories Tomcat
has already registeredpublic java.net.URLStreamHandler createURLStreamHandler(java.lang.String protocol)
createURLStreamHandler
in interface java.net.URLStreamHandlerFactory
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.