Exemplo n.º 1
0
  public void reconnect() throws LDAPException {
    final String host = getHost();
    final int port = getPort();
    final String dn = authDN;
    final String pw = authPW;

    conn.close();

    if ((dn == null) || (pw == null)) {
      connect(host, port);
    } else {
      connect(host, port, dn, pw);
    }
  }
Exemplo n.º 2
0
  public void connect(
      final int version,
      final String host,
      final int port,
      final String dn,
      final String password,
      final LDAPConstraints constraints)
      throws LDAPException {
    connect(host, port);

    try {
      if ((dn != null) && (password != null)) {
        bind(version, dn, password, constraints);
      }
    } catch (LDAPException le) {
      conn.close();
      throw le;
    }
  }
Exemplo n.º 3
0
  @Override()
  protected void finalize() throws Throwable {
    conn.close();

    super.finalize();
  }
Exemplo n.º 4
0
 public void disconnect() throws LDAPException {
   conn.close();
   authDN = null;
   authPW = null;
 }