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,
PreferredConnection.Type connectionType,
org.forgerock.opendj.ldap.DN bindDn,
String bindPwd,
int connectTimeout,
TrustManager trustManager)
Creates a connection wrapper.
|
ConnectionWrapper(HostPort hostPort,
PreferredConnection.Type connectionType,
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.
|
PreferredConnection.Type |
getConnectionType()
Returns the connection type 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, PreferredConnection.Type connectionType, 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 toconnectionType - the type of connection (LDAP, LDAPS, START_TLS)bindDn - 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, PreferredConnection.Type connectionType, 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 toconnectionType - the type of connection (LDAP, LDAPS, START_TLS)bindDn - 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 PreferredConnection.Type getConnectionType()
public HostPort getHostPort()
public org.forgerock.opendj.server.config.client.RootCfgClient getRootConfiguration()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2010-2020 Wren Security. All Rights Reserved.