org.apache.directory.ldap.client.api.LdapConnection.connect()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中org.apache.directory.ldap.client.api.LdapConnection.connect()方法的一些代码示例,展示了LdapConnection.connect()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LdapConnection.connect()方法的具体详情如下:
包路径:org.apache.directory.ldap.client.api.LdapConnection
类名称:LdapConnection
方法名:connect

LdapConnection.connect介绍

[英]Connect to the remote LDAP server.
[中]连接到远程LDAP服务器。

代码示例

代码示例来源:origin: org.apache.directory.api/api-ldap-client-all

/**
 * {@inheritDoc}
 */
@Override
public boolean connect() throws LdapException
{
  return connection.connect();
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-api

/**
 * {@inheritDoc}
 */
@Override
public boolean connect() throws LdapException
{
  return connection.connect();
}

代码示例来源:origin: org.apache.directory.api/api-all

/**
 * {@inheritDoc}
 */
@Override
public boolean connect() throws LdapException
{
  return connection.connect();
}

代码示例来源:origin: org.openengsb.infrastructure/org.openengsb.infrastructure.ldap

@Override
public void start(BundleContext context) throws Exception {
  connection = new LdapNetworkConnection("localhost", 10389);
  connection.connect();
}

代码示例来源:origin: epam/DLab

public LdapConnection connect() throws Exception {
    final LdapConnection connection = getConnection();
    if (!connection.connect()) {
      log.error("Cannot establish a connection to LDAP server");
      throw new DlabException("Login user failed. LDAP server is not available");
    }
    connection.bind();
    return connection;
  }
}

代码示例来源:origin: org.apache.directory.client.ldap/ldap-client-api

connect();

代码示例来源:origin: com.floragunn/search-guard

ldapConnection.connect();
if (!ldapConnection.isConnected()) {
  continue;

代码示例来源:origin: org.openengsb.infrastructure/org.openengsb.infrastructure.ldap

/**
 * Opens the dao's connection. Dn and credentials are used for authentication. Throws an {@link LdapDaoException} in
 * case of IO error or invalid dn.
 * */
public void connect(String dn, String credentials) {
  BindRequest bindRequest = new BindRequestImpl();
  bindRequest.setCredentials(credentials);
  try {
    bindRequest.setDn(new Dn(dn));
    connection.connect();
    connection.bind(bindRequest);
    ((LdapNetworkConnection) connection).loadSchema(new DefaultSchemaLoader(connection));
  } catch (Exception e) {
    throw new LdapDaoException(e);
  }
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-api

connection.connect();

代码示例来源:origin: org.apache.directory.api/api-all

connection.connect();

代码示例来源:origin: org.apache.directory.api/api-ldap-client-all

connection.connect();

相关文章