org.openorb.util.urlhandler
Class HandlerFactory
java.lang.Object
|
+--org.openorb.util.urlhandler.HandlerFactory
- All Implemented Interfaces:
- URLStreamHandlerFactory
- public class HandlerFactory
- extends Object
- implements URLStreamHandlerFactory
This is the factory class to create a custom URL stream handler.
- Version:
- $Revision: 1.4 $ $Date: 2004/02/10 21:28:45 $
- Author:
- Chris Wood
|
Constructor Summary |
HandlerFactory()
Creates a new HandlerFactory with the context classloader for loading
ressources |
HandlerFactory(ClassLoader cl)
Creates a new HandlerFactory with a specific classloader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HandlerFactory
public HandlerFactory()
- Creates a new HandlerFactory with the context classloader for loading
ressources
HandlerFactory
public HandlerFactory(ClassLoader cl)
- Creates a new HandlerFactory with a specific classloader
- Parameters:
cl - specific classloader for loading resources, null falls back to
the context class loader
createURLStreamHandler
public URLStreamHandler createURLStreamHandler(String protocol)
- Creates a
URLStreamHandler for supported protocols.
Currently "classpath" and "resource" are supported.
- Specified by:
createURLStreamHandler in interface URLStreamHandlerFactory
- Parameters:
protocol - the protocol to be handled.- Returns:
- a
URLStreamHandler if the protocol is supported,
null if not.