org.exolab.jms.jndi.http
Class HttpJndiInitialContextFactory

java.lang.Object
  |
  +--org.exolab.jms.jndi.http.HttpJndiInitialContextFactory
All Implemented Interfaces:
javax.naming.spi.InitialContextFactory
Direct Known Subclasses:
SslHttpJndiInitialContextFactory

public class HttpJndiInitialContextFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory

This is the client side helper class that retrieves the root context of the JNDI server. This class implements the InitialContextFactory interface.

Version:
$Revision: 1.20 $ $Date: 2004/01/29 12:14:14 $
Author:
Jim Mourikis, Tim Anderson

Field Summary
protected static java.lang.String SERVLET
          The JNDI servlet name
 
Constructor Summary
HttpJndiInitialContextFactory()
          Default constructor
 
Method Summary
 javax.naming.Context getInitialContext(java.util.Hashtable environment)
          Creates an initial context for beginning name resolution.
protected  java.lang.String getProviderURL(java.util.Hashtable environment)
          Returns the JNDI provider URL
protected  org.exolab.core.http.HttpClient openConnection(java.lang.String url)
          Get a connection to the JNDI provider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVLET

protected static final java.lang.String SERVLET
The JNDI servlet name
Constructor Detail

HttpJndiInitialContextFactory

public HttpJndiInitialContextFactory()
Default constructor
Method Detail

getInitialContext

public javax.naming.Context getInitialContext(java.util.Hashtable environment)
                                       throws javax.naming.NamingException
Creates an initial context for beginning name resolution.
Specified by:
getInitialContext in interface javax.naming.spi.InitialContextFactory
Parameters:
environment - the environment specifying information to be used in the creation of the initial context.
Returns:
the initial context
Throws:
javax.naming.NamingException - if the initial context cannot be created

getProviderURL

protected java.lang.String getProviderURL(java.util.Hashtable environment)
                                   throws javax.naming.NamingException
Returns the JNDI provider URL
Returns:
the JNDI provider URL
Throws:
javax.naming.NamingException - if the URL cannot be determined

openConnection

protected org.exolab.core.http.HttpClient openConnection(java.lang.String url)
                                                  throws javax.naming.NamingException
Get a connection to the JNDI provider
Parameters:
url - the JNDI provider URL
Returns:
a connection to the JNDI provider
Throws:
javax.naming.NamingException - if a connection cannot be established


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.