FileDocCategorySizeDatePackage
DirContextURLStreamHandlerFactory.javaAPI DocGlassfish v2 API3464Fri May 04 22:33:00 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: 1.4 $

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;
        }