/** * {@inheritDoc} */ @Override public void setTimeOut( long timeOut ) { connection.setTimeOut( timeOut ); }
/** * {@inheritDoc} */ @Override public void setTimeOut( long timeOut ) { connection.setTimeOut( timeOut ); }
/** * {@inheritDoc} */ @Override public void setTimeOut( long timeOut ) { connection.setTimeOut( timeOut ); }
/** * {@inheritDoc} */ @Override public LdapConnection configureConnection( LdapConnection connection ) { connection.setTimeOut( timeout ); connection.setBinaryAttributeDetector( connectionConfig.getBinaryAttributeDetector() ); return connection; }
/** * {@inheritDoc} */ @Override public LdapConnection configureConnection( LdapConnection connection ) { connection.setTimeOut( timeout ); connection.setBinaryAttributeDetector( connectionConfig.getBinaryAttributeDetector() ); return connection; }
/** * {@inheritDoc} */ @Override public LdapConnection configureConnection( LdapConnection connection ) { connection.setTimeOut( timeout ); connection.setBinaryAttributeDetector( connectionConfig.getBinaryAttributeDetector() ); return connection; }
/** * Gets a LdapNetworkConnection bound to the Admin user (uid=admin,ou=system). * * @param ldapServer The LdapServer to be connected to * @return A LdapNetworkConnection instance * @exception LdapException If the connection could not be established. */ public static LdapConnection getAdminNetworkConnection( LdapServer ldapServer ) throws LdapException { LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ); connection.setTimeOut( 30000L ); connection.bind( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" ); OPEN_CONNECTIONS.add( connection ); return connection; }
@JsonIgnore public LdapConnection getConnection(final IOUtils.CloseableContext context, final Long timeOut) throws LdapException { LdapConnection connection; if (connectionPool != null) connection = connectionPool.getConnection(); else connection = new LdapNetworkConnection(config); if (context != null) context.add(connection); if (timeOut != null) connection.setTimeOut(timeOut); return connection; }
/** * Gets an anonymous LdapNetworkConnection * * @param ldapServer The LDAP server we want to connect to * @return A LdapNetworkConnection instance * @exception LdapException If the connection could not be established. */ public static LdapConnection getAnonymousNetworkConnection( LdapServer ldapServer ) throws LdapException { LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ); connection.setTimeOut( 0L ); connection.bind(); return connection; } }