Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Internet Directory
11g Release 1 (11.1.1.9)

E56822-01


oracle.ldap.util.jndi
Class ConnectionUtil

java.lang.Object
  extended by oracle.ldap.util.jndi.ConnectionUtil


public class ConnectionUtil
extends java.lang.Object

This class provides a set of static functions to support the creation of JNDI DirContext connecting to OID. SSL connection is also supported.


Constructor Summary
ConnectionUtil()
           

 

Method Summary
static java.lang.String discoverSSLPort(java.lang.String host, java.lang.String port, java.lang.String bindDN, char[] bindPwd)
          Returns the SSL port number from OID.
static java.lang.String discoverSSLPort(java.lang.String host, java.lang.String port, java.lang.String bindDN, java.lang.String bindPwd)
          Deprecated. Please use discoverSSLPort(String, String, String, char[])
static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(DiscoveryHelper discObj, java.lang.String bindDN, char[] bindPwd)
          Returns an InitialLdapContext using connect information obtained by calling discover() method of DiscoveryHelper class.
static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(DiscoveryHelper discObj, java.lang.String bindDN, java.lang.String bindPwd)
          Deprecated. Please use getDefaultDirCtx(DiscoveryHelper, String, char[])
static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, char[] bindPwd)
          Returns a non-SSL InitialLdapContext using the specified info.
static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, char[] bindPwd, long timelimit)
          Returns a non-SSL InitialLdapContext using the specified info - allowing the option to specify a timeout limit.
static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, java.lang.String bindPwd)
          Deprecated. Please use getDefaultDirCtx(String, String, String, char[])
static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, java.lang.String bindPwd, long timelimit)
          Deprecated. Please use getDefaultDirCtx(String, String, String, char[], long)
static javax.naming.ldap.InitialLdapContext getSSLDirCtx(DiscoveryHelper discObj, java.lang.String bindDN, char[] bindPwd)
          Returns a InitialLdapContext using the connect information calling discover() method of DiscoveryHelper class.
static javax.naming.ldap.InitialLdapContext getSSLDirCtx(DiscoveryHelper discObj, java.lang.String bindDN, java.lang.String bindPwd)
          Deprecated. Please use getSSLDirCtx(DiscoveryHelper, String, char[])
static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, char[] bindPwd)
          Returns an InitialLdapContext using the connect information provided.
static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, char[] bindPwd, java.lang.String sslSocketFactory)
          Returns an InitialLdapContext using the connect information provided - including the SSLSocketFactory implementation.
static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, java.lang.String bindPwd)
          Deprecated. Please use getSSLDirCtx(String, String, String, char[])
static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host, java.lang.String port, java.lang.String bindDN, java.lang.String bindPwd, java.lang.String sslSocketFactory)
          Deprecated. Please use getSSLDirCtx(String, String, String, char[], String)

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ConnectionUtil

public ConnectionUtil()

Method Detail

discoverSSLPort

@Deprecated
public static java.lang.String discoverSSLPort(java.lang.String host,
                                                          java.lang.String port,
                                                          java.lang.String bindDN,
                                                          java.lang.String bindPwd)
                                        throws javax.naming.NamingException
Deprecated. Please use discoverSSLPort(String, String, String, char[])
Returns the SSL port number from OID. This uses the specified info to establish a non-SSL OID connection and fetches the information in configset 0.
Parameters:
host - The hostname where the non-SSL OID is running
port - The port number on which the non-SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Throws:
javax.naming.NamingException

discoverSSLPort

public static java.lang.String discoverSSLPort(java.lang.String host,
                                               java.lang.String port,
                                               java.lang.String bindDN,
                                               char[] bindPwd)
                                        throws javax.naming.NamingException
Returns the SSL port number from OID. This uses the specified info to establish a non-SSL OID connection and fetches the information in configset 0.
Parameters:
host - The hostname where the non-SSL OID is running
port - The port number on which the non-SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Throws:
javax.naming.NamingException

getDefaultDirCtx

@Deprecated
public static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host,
                                                                               java.lang.String port,
                                                                               java.lang.String bindDN,
                                                                               java.lang.String bindPwd,
                                                                               long timelimit)
                                                             throws javax.naming.NamingException
Deprecated. Please use getDefaultDirCtx(String, String, String, char[], long)
Returns a non-SSL InitialLdapContext using the specified info - allowing the option to specify a timeout limit. The timelimit specifies the amount of time the method will wait for a successful connection. A timelimit may be desirable in case of a hang while establishing the connection. For example, binding against an SSL port.
Parameters:
host - host name of the directory server
port - port number of the directory server
bindDN - DN of the bind user
bindPwd - password of the bind user
Returns:
a InitialLdapContext
Throws:
javax.naming.NamingException

getDefaultDirCtx

public static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host,
                                                                    java.lang.String port,
                                                                    java.lang.String bindDN,
                                                                    char[] bindPwd,
                                                                    long timelimit)
                                                             throws javax.naming.NamingException
Returns a non-SSL InitialLdapContext using the specified info - allowing the option to specify a timeout limit. The timelimit specifies the amount of time the method will wait for a successful connection. A timelimit may be desirable in case of a hang while establishing the connection. For example, binding against an SSL port.
Parameters:
host - host name of the directory server
port - port number of the directory server
bindDN - DN of the bind user
bindPwd - password of the bind user
Returns:
a InitialLdapContext
Throws:
javax.naming.NamingException

getDefaultDirCtx

@Deprecated
public static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host,
                                                                               java.lang.String port,
                                                                               java.lang.String bindDN,
                                                                               java.lang.String bindPwd)
                                                             throws javax.naming.NamingException
Deprecated. Please use getDefaultDirCtx(String, String, String, char[])
Returns a non-SSL InitialLdapContext using the specified info. For SSL connection, please use getSSLDirCtx instead.
Parameters:
host - The hostname where the non-SSL OID is running
port - The port number on which the non-SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Returns:
an InitialLdapContext
Throws:
javax.naming.NamingException

getDefaultDirCtx

public static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(java.lang.String host,
                                                                    java.lang.String port,
                                                                    java.lang.String bindDN,
                                                                    char[] bindPwd)
                                                             throws javax.naming.NamingException
Returns a non-SSL InitialLdapContext using the specified info. For SSL connection, please use getSSLDirCtx instead.
Parameters:
host - The hostname where the non-SSL OID is running
port - The port number on which the non-SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Returns:
an InitialLdapContext
Throws:
javax.naming.NamingException

getDefaultDirCtx

@Deprecated
public static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(DiscoveryHelper discObj,
                                                                               java.lang.String bindDN,
                                                                               java.lang.String bindPwd)
                                                             throws javax.naming.NamingException
Deprecated. Please use getDefaultDirCtx(DiscoveryHelper, String, char[])
Returns an InitialLdapContext using connect information obtained by calling discover() method of DiscoveryHelper class. The corresponding non-SSL OID server must be running. For SSL connection, please use getSSLDirCtx instead
Parameters:
discObj - instance of DiscoveryHelper class
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password the domain name required for DNS lookup.
Throws:
javax.naming.NamingException

getDefaultDirCtx

public static javax.naming.ldap.InitialLdapContext getDefaultDirCtx(DiscoveryHelper discObj,
                                                                    java.lang.String bindDN,
                                                                    char[] bindPwd)
                                                             throws javax.naming.NamingException
Returns an InitialLdapContext using connect information obtained by calling discover() method of DiscoveryHelper class. The corresponding non-SSL OID server must be running. For SSL connection, please use getSSLDirCtx instead
Parameters:
discObj - instance of DiscoveryHelper class
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password the domain name required for DNS lookup.
Throws:
javax.naming.NamingException

getSSLDirCtx

@Deprecated
public static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host,
                                                                           java.lang.String port,
                                                                           java.lang.String bindDN,
                                                                           java.lang.String bindPwd)
                                                         throws javax.naming.NamingException
Deprecated. Please use getSSLDirCtx(String, String, String, char[])
Returns an InitialLdapContext using the connect information provided. This connection will operate in the SSL mode The corresponding OID server must be accepting SSL connections.
Parameters:
host - The hostname where the SSL OID is running
port - The port number on which the SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Returns:
an SSL InitialLdapContext
Throws:
javax.naming.NamingException

getSSLDirCtx

public static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host,
                                                                java.lang.String port,
                                                                java.lang.String bindDN,
                                                                char[] bindPwd)
                                                         throws javax.naming.NamingException
Returns an InitialLdapContext using the connect information provided. This connection will operate in the SSL mode The corresponding OID server must be accepting SSL connections.
Parameters:
host - The hostname where the SSL OID is running
port - The port number on which the SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Returns:
an SSL InitialLdapContext
Throws:
javax.naming.NamingException

getSSLDirCtx

@Deprecated
public static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host,
                                                                           java.lang.String port,
                                                                           java.lang.String bindDN,
                                                                           java.lang.String bindPwd,
                                                                           java.lang.String sslSocketFactory)
                                                         throws javax.naming.NamingException
Deprecated. Please use getSSLDirCtx(String, String, String, char[], String)
Returns an InitialLdapContext using the connect information provided - including the SSLSocketFactory implementation. This connection will operate in the SSL mode. The corresponding OID server must be accepting SSL connections. The sslSocketFactory parameter expects the class name of a customized SSL Socket Factory implementation.
Parameters:
host - The hostname where the SSL OID is running
port - The port number on which the SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
sslSocketFactory - the class name of the socket factory implementation to be used by JNDI
Returns:
an SSL InitialLdapContext
Throws:
javax.naming.NamingException

getSSLDirCtx

public static javax.naming.ldap.InitialLdapContext getSSLDirCtx(java.lang.String host,
                                                                java.lang.String port,
                                                                java.lang.String bindDN,
                                                                char[] bindPwd,
                                                                java.lang.String sslSocketFactory)
                                                         throws javax.naming.NamingException
Returns an InitialLdapContext using the connect information provided - including the SSLSocketFactory implementation. This connection will operate in the SSL mode. The corresponding OID server must be accepting SSL connections. The sslSocketFactory parameter expects the class name of a customized SSL Socket Factory implementation.
Parameters:
host - The hostname where the SSL OID is running
port - The port number on which the SSL OID is running
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
sslSocketFactory - the class name of the socket factory implementation to be used by JNDI
Returns:
an SSL InitialLdapContext
Throws:
javax.naming.NamingException

getSSLDirCtx

@Deprecated
public static javax.naming.ldap.InitialLdapContext getSSLDirCtx(DiscoveryHelper discObj,
                                                                           java.lang.String bindDN,
                                                                           java.lang.String bindPwd)
                                                         throws javax.naming.NamingException
Deprecated. Please use getSSLDirCtx(DiscoveryHelper, String, char[])
Returns a InitialLdapContext using the connect information calling discover() method of DiscoveryHelper class. Use this only if this is SSL connection. The corresponding SSL OID server must be running.
Parameters:
discObj - instance of DiscoveryHelper class
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Throws:
javax.naming.NamingException

getSSLDirCtx

public static javax.naming.ldap.InitialLdapContext getSSLDirCtx(DiscoveryHelper discObj,
                                                                java.lang.String bindDN,
                                                                char[] bindPwd)
                                                         throws javax.naming.NamingException
Returns a InitialLdapContext using the connect information calling discover() method of DiscoveryHelper class. Use this only if this is SSL connection. The corresponding SSL OID server must be running.
Parameters:
discObj - instance of DiscoveryHelper class
bindDN - the bind DN (eg. cn=orcladmin)
bindPwd - the bind password
Throws:
javax.naming.NamingException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Internet Directory
11g Release 1 (11.1.1.9)

E56822-01


Copyright © 1999, 2015 Oracle and/or its affiliates. All Rights Reserved.