Microsoft HomeProductsSearchSupportShopWrite Usspacer.gif Microsoft Home
Microsoft Packages
  In this topic

*Constructors

*Methods

 

Packages   Previous Microsoft Packages Next
Package com.ms.adsi   Previous This
Package
Next

 


Class ADsConn

public class ADsConn
{
  // Constructors
  public ADsConn(URL configFile) throws IADsException;
  public ADsConn(String configFile) throws IADsException;

  // Methods
  public INIFileParser getConfigFile();
  public IADs getObject(String ADsPath) throws IADsException;
  public IADs getObject( String ADsPath, String userName,
        String passWord, long cntrl ) throws IADsException;
}

This class implements the Active Directory connection object. The connection object maintains the global ADS namespace and a list of providers.

Also see Also Active Directory Design Specification Version 1.0

Constructors

ADsConn

public ADsConn(URL configFile) throws IADsException;

Constructs a AD connection object with URL configuration file. Upon creation, the configuration file is read, and providers are instantiated and cached.

ParameterDescription
configFileremote configuration file

Exceptions

IADsException failed to find or parse configuration file

ADsConn

public ADsConn(String configFile) throws IADsException;

Constructs a AD connection object with local configuration file. Upon creation, the configuration file is read, and providers are instantiated and cached.

ParameterDescription
configFilelocal configuration file

Exceptions

IADsException failed to find or parse configuration file

Methods

getConfigFile 

public INIFileParser getConfigFile();

getObject 

public IADs getObject(String ADsPath) throws IADsException;

Binds to an Active Directory object. If ADsPath equals to "ADS:", the default namespaces object is returned. Otherwise, ADsPath is passed to appropriate providers based on the provider identifier, and the provider returns corresponding object binding. If the specified provider is not previously installed, this method will try to instantiate dynamically. If the provider is not found, null is returned.

Return Value

Returns active directory object binding

ParameterDescription
ADsPathdirectory objects in heterogeneous environment. Only URL format is allowed.

Exceptions

IADsException failed to get object

getObject 

public IADs getObject( String ADsPath, String userName,
        String passWord, long cntrl ) throws IADsException;

Binds to an Active Directory object. If ADsPath equals to "ADS:", the default namespaces object is returned. Otherwise, ADsPath is passed to appropriate providers based on the provider identifier, and the provider returns corresponding object binding. If the specified provider is not previously installed, this method will try to instantiate dynamically. If the provider is not found, null is returned.

Return Value

Returns active directory object binding

ParameterDescription
ADsPathdirectory objects in heterogeneous environment. Only URL format is allowed.
userName,String value of user name to bind with.
passWord,String value to use as password.
cntrl,long indicating type of authentication to use, see IADsOpenDSObject and ADsProvider for legal values.

Exceptions

IADsException failed to get object

Back To Top © 1997 Microsoft Corporation. All rights reserved. Terms of use.