com.novell.service.nw
Class NetWareInitialContextFactory

java.lang.Object
  |
  +--com.novell.service.nw.NetWareInitialContextFactory

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

Creates different NetWare Initial Contexts depending on the Context.PROVIDER_URL entry.


Constructor Summary
NetWareInitialContextFactory()
           
 
Method Summary
 javax.naming.Context getInitialContext(java.util.Hashtable hash)
          Creates an initial context based on the Context.PROVIDER_URL entry passed in the hash parameter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetWareInitialContextFactory

public NetWareInitialContextFactory()
Method Detail

getInitialContext

public javax.naming.Context getInitialContext(java.util.Hashtable hash)
                                       throws javax.naming.NamingException
Creates an initial context based on the Context.PROVIDER_URL entry passed in the hash parameter.

The syntax for the URL is [[NetWare://][<SapHost>]/"Trees | Servers"/<DomainName>] If the URL is not set or is empty, a NetWareInitialContext will be returned. The optional SapHost is for backwards compatability with older client libraries only. The NetWare name space tries SLP to list the available trees and servers and ignores the SapHost name. If SLP is not available on an older client, the SapHost will be queried by the NetWare name space when it lists trees and servers. If the SapHost is not set, a default session will be used. If the remaining portion of the URL contains a domain name, either a Tree context or a Server context will be returned.

The NetWare name space will use the default public SessionManager unless the com.novell.utility.naming.Environment.SESSION_MANAGER_OBJECT key is set in the Hashtable parameter.

Specified by:
getInitialContext in interface javax.naming.spi.InitialContextFactory
Parameters:
hash - Contains information that determines what context is to be returned.
Returns:
The Context created.
Throws:
javax.naming.NamingException - When an error occurs.