/** * {@inheritDoc} */ @Override public boolean connect() throws LdapException { return connection.connect(); }
/** * {@inheritDoc} */ @Override public boolean connect() throws LdapException { return connection.connect(); }
/** * {@inheritDoc} */ @Override public boolean connect() throws LdapException { return connection.connect(); }
@Override public void start(BundleContext context) throws Exception { connection = new LdapNetworkConnection("localhost", 10389); connection.connect(); }
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; } }
ldapConnection.connect(); if (!ldapConnection.isConnected()) { continue;
/** * 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); } }
connection.connect();