org.sape.carbon.services.jndi
Interface InitialContextFactory

All Superinterfaces:
FunctionalInterface
All Known Implementing Classes:
DefaultInitialContextFactoryImpl

public interface InitialContextFactory
extends FunctionalInterface

This service provides a consistent way for gaining access to a JNDI InitialContext. This service allows clients to get InitialContexts based solely on configuration, solely on parameters, or a mixture between the two with parameters taking precedence.

Since:
carbon 2.1
Version:
$Revision: 1.2 $($Author: dvoet $ / $Date: 2003/10/30 19:28:56 $)
Author:
Douglas Voet, Jul 30, 2003
See Also:
Copyright 2003 Sapient

Method Summary
 InitialContext getContext()
          Gets a new InitialContext instance with evironment values that come from the service's configuration.
 InitialContext getContext(Map environment)
          Gets a new InitialContext instance with evironment values that come from the service's configuration, but environment values can also be passed via the environment parameter to augment or override the values stored in configuration.
 InitialContext getContextIgnoreConfig(Map environment)
          Gets a new InitialContext with environment values given in the evironment parameter.
 InitialDirContext getDirContext()
          Gets a new InitialDirContext instance with evironment values that come from the service's configuration.
 InitialDirContext getDirContext(Map environment)
          Gets a new InitialDirContext instance with evironment values that come from the service's configuration, but environment values can also be passed via the environment parameter to augment or override the values stored in configuration.
 InitialDirContext getDirContextIgnoreConfig(Map environment)
          Gets a new InitialDirContext with environment values given in the evironment parameter.
 

Method Detail

getContext

public InitialContext getContext()
                          throws NamingException
Gets a new InitialContext instance with evironment values that come from the service's configuration.

Returns:
a new InitalContext
Throws:
NamingException

getContext

public InitialContext getContext(Map environment)
                          throws NamingException
Gets a new InitialContext instance with evironment values that come from the service's configuration, but environment values can also be passed via the environment parameter to augment or override the values stored in configuration.

Parameters:
environment - values that augment and/or override the values stored in configuration
Returns:
a new InitialContext
Throws:
NamingException

getContextIgnoreConfig

public InitialContext getContextIgnoreConfig(Map environment)
                                      throws NamingException
Gets a new InitialContext with environment values given in the evironment parameter. The service's configuration is ignored.

Parameters:
environment - values used to construct the InitialContext
Returns:
a new InitialContext
Throws:
NamingException

getDirContext

public InitialDirContext getDirContext()
                                throws NamingException
Gets a new InitialDirContext instance with evironment values that come from the service's configuration.

Returns:
a new InitialDirContext
Throws:
NamingException

getDirContext

public InitialDirContext getDirContext(Map environment)
                                throws NamingException
Gets a new InitialDirContext instance with evironment values that come from the service's configuration, but environment values can also be passed via the environment parameter to augment or override the values stored in configuration.

Parameters:
environment - values that augment and/or override the values stored in configuration
Returns:
a new InitialDirContext
Throws:
NamingException

getDirContextIgnoreConfig

public InitialDirContext getDirContextIgnoreConfig(Map environment)
                                            throws NamingException
Gets a new InitialDirContext with environment values given in the evironment parameter. The service's configuration is ignored.

Parameters:
environment - values used to construct the InitialContext
Returns:
a new InitialDirContext
Throws:
NamingException


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.