public class ConnectionWrapper extends Object implements Closeable
You can either:
getLdapContext()
method to obtain an InitialLdapContext
for JNDI.getConnection()
method to obtain a Connection
object.Constructor and Description |
---|
ConnectionWrapper(ConnectionWrapper other)
Creates a connection wrapper by copying the provided one.
|
ConnectionWrapper(HostPort hostPort,
org.forgerock.opendj.ldap.ConnectionSecurity connectionSecurity,
org.forgerock.opendj.ldap.Dn bindDn,
String bindPwd,
int connectTimeout,
TrustManager trustManager)
Creates a connection wrapper.
|
ConnectionWrapper(HostPort hostPort,
org.forgerock.opendj.ldap.ConnectionSecurity connectionSecurity,
org.forgerock.opendj.ldap.Dn bindDn,
String bindPwd,
int connectTimeout,
TrustManager trustManager,
KeyManager keyManager)
Creates a connection wrapper.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.forgerock.opendj.ldap.Dn |
getBindDn()
Returns the bind DN used by this connection.
|
String |
getBindPassword()
Returns the bind password used by this connection.
|
org.forgerock.opendj.ldap.Connection |
getConnection()
Returns the connection.
|
org.forgerock.opendj.ldap.ConnectionSecurity |
getConnectionSecurity()
Returns the connection security used by this connection wrapper.
|
HostPort |
getHostPort()
Returns the host name and port number of this connection.
|
String |
getLdapUrl()
Returns the LDAP URL used by this connection.
|
org.forgerock.opendj.server.config.client.RootCfgClient |
getRootConfiguration()
Returns the root configuration client by using the inrnal Connection.
|
boolean |
isLdaps()
Returns whether this connection uses LDAPS.
|
boolean |
isStartTls()
Returns whether this connection uses StartTLS.
|
String |
toString() |
public ConnectionWrapper(HostPort hostPort, org.forgerock.opendj.ldap.ConnectionSecurity connectionSecurity, org.forgerock.opendj.ldap.Dn bindDn, String bindPwd, int connectTimeout, TrustManager trustManager) throws org.forgerock.opendj.ldap.LdapException
hostPort
- the host name and port number to connect toconnectionSecurity
- the connection securitybindDn
- the bind DNbindPwd
- the bind passwordconnectTimeout
- connect timeout to use for the connectiontrustManager
- trust manager to use for a secure connectionorg.forgerock.opendj.ldap.LdapException
- If an error occurspublic ConnectionWrapper(ConnectionWrapper other) throws org.forgerock.opendj.ldap.LdapException
other
- the ConnectionWrapper
to copyorg.forgerock.opendj.ldap.LdapException
- If an error occurspublic ConnectionWrapper(HostPort hostPort, org.forgerock.opendj.ldap.ConnectionSecurity connectionSecurity, org.forgerock.opendj.ldap.Dn bindDn, String bindPwd, int connectTimeout, TrustManager trustManager, KeyManager keyManager) throws org.forgerock.opendj.ldap.LdapException
hostPort
- the host name and port number to connect toconnectionSecurity
- the connection securitybindDn
- the bind DNbindPwd
- the bind passwordconnectTimeout
- connect timeout to use for the connectiontrustManager
- trust manager to use for a secure connectionkeyManager
- key manager to use for a secure connectionorg.forgerock.opendj.ldap.LdapException
- If an error occurspublic org.forgerock.opendj.ldap.Dn getBindDn()
public String getBindPassword()
public String getLdapUrl()
public boolean isLdaps()
true
if this connection uses LDAPS, false
otherwise.public boolean isStartTls()
true
if this connection uses StartTLS, false
otherwise.public org.forgerock.opendj.ldap.Connection getConnection()
public org.forgerock.opendj.ldap.ConnectionSecurity getConnectionSecurity()
public HostPort getHostPort()
public org.forgerock.opendj.server.config.client.RootCfgClient getRootConfiguration()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.