FileDocCategorySizeDatePackage
DirContextURLStreamHandlerFactory.javaAPI DocApache Tomcat 6.0.142235Fri Jul 20 04:20:36 BST 2007org.apache.naming.resources

DirContextURLStreamHandlerFactory

public class DirContextURLStreamHandlerFactory extends Object implements URLStreamHandlerFactory
Factory for Stream handlers to a JNDI directory context.
author
Remy Maucherat
version
$Revision: 467222 $

Fields Summary
Constructors Summary
public DirContextURLStreamHandlerFactory()

    
Methods Summary
public java.net.URLStreamHandlercreateURLStreamHandler(java.lang.String protocol)
Creates a new URLStreamHandler instance with the specified protocol. Will return null if the protocol is not jndi.

param
protocol the protocol (must be "jndi" here)
return
a URLStreamHandler for the jndi protocol, or null if the protocol is not JNDI

        if (protocol.equals("jndi")) {
            return new DirContextURLStreamHandler();
        } else {
            return null;
        }