ice.util.net
Class URLStreamHandlerFactory

java.lang.Object
  extended byice.util.net.URLStreamHandlerFactory
All Implemented Interfaces:
URLStreamHandlerFactory

public class URLStreamHandlerFactory
extends Object
implements URLStreamHandlerFactory

This class is a factory for URL stream protocol handlers.

It is used by the URL class to create a URLStreamHandler for a specific protocol.


Constructor Summary
URLStreamHandlerFactory()
           
 
Method Summary
static void addStreamHandler(String protocolName, Class cl)
          Deprecated. Use addStreamHandler(String protocolName, String className) instead. The method is an alias for addStreamHandler(protocolName, cl.getName())
static void addStreamHandler(String protocolName, String className)
          Adds the provided URLStreamhandler class for the named protocol to the factory.
 URLStreamHandler createURLStreamHandler(String protocol)
          Creates a new URLStreamHandler instance if the specified protocol is handled by the factory.
static void init()
          Deprecated. No operation. The function was never able to carry its function due to limitations of Java URL.setURLStreamHandlerFactory which stores URLStreamHandler instances permanently.
static void removeStreamHandler(String protocol)
           
static void unload()
          Deprecated. No operation. The function was never able to carry its function due to limitations of Java URL.setURLStreamHandlerFactory which stores URLStreamHandler instances permanently.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLStreamHandlerFactory

public URLStreamHandlerFactory()
Method Detail

init

public static void init()
Deprecated. No operation. The function was never able to carry its function due to limitations of Java URL.setURLStreamHandlerFactory which stores URLStreamHandler instances permanently.


unload

public static void unload()
Deprecated. No operation. The function was never able to carry its function due to limitations of Java URL.setURLStreamHandlerFactory which stores URLStreamHandler instances permanently.


createURLStreamHandler

public URLStreamHandler createURLStreamHandler(String protocol)
Creates a new URLStreamHandler instance if the specified protocol is handled by the factory. Return null and let the default handler be called otherwise.

Specified by:
createURLStreamHandler in interface URLStreamHandlerFactory
Parameters:
protocol - the protocol ("ftp", "http", "nntp", etc.).

addStreamHandler

public static void addStreamHandler(String protocolName,
                                    String className)
Adds the provided URLStreamhandler class for the named protocol to the factory. The Handler overrides any default behaviour.


addStreamHandler

public static void addStreamHandler(String protocolName,
                                    Class cl)
Deprecated. Use addStreamHandler(String protocolName, String className) instead. The method is an alias for addStreamHandler(protocolName, cl.getName())


removeStreamHandler

public static void removeStreamHandler(String protocol)