ldapConstraints.setTimeLimit(confService.getOperationTimeout() * 1000);
/** * Sets the maximum number of milliseconds the client waits for * any operation under these search constraints to complete. * * @see <a href="../../../../api/com/novell/ldap/LDAPConstraints.html#setTimeLimit(int)"> com.novell.ldap.LDAPConstraints.setTimeLimit(int)</a> */ public void setTimeLimit(int msLimit) { cons.setTimeLimit(msLimit); return; }
/** * Applies <code>LDAPConstraints</code> * to the specified <code>LDAPConnection</code>. * Implemented to assign <code>timeLimit</code> and * <code>referralFollowing</code> constraint values * retrieved from the currently assigned * {@link LdapConnectionManagerConfig}. * * @param conn */ protected void applyConstraints(LDAPConnection conn) { int timeout = config.getOperationTimeout(); boolean followReferrals = config.isFollowReferrals(); if ( log.isDebugEnabled() ) { log.debug("applyConstraints(): values [timeout = " + timeout + "][follow referrals = " + followReferrals + "]"); } LDAPConstraints constraints = new LDAPConstraints(); constraints.setTimeLimit(timeout); constraints.setReferralFollowing(followReferrals); conn.setConstraints(constraints); }
/** * Constructs a new LDAPConstraints object, using the specified * operational constraints for waiting, referrals, LDAPBindHandler * object, and hop limit. * * @see com.novell.ldap.LDAPConstraints#LDAPConstraints( int,boolean,LDAPReferralHandler,int) * @see <a href="../../../../api/com/novell/ldap/LDAPConstraints.html#LDAPConstraints(int, boolean, com.novell.ldap.LDAPReferralHandler, int)"> com.novell.ldap.LDAPConstraints.LDAPConstraints(int, boolean, LDAPReferralHandler, int)</a> */ public LDAPConstraints(int msLimit, boolean doReferrals, LDAPReferralHandler handler, int hop_limit) { // Set defaults for search parameters this.cons = new com.novell.ldap.LDAPSearchConstraints(); // Set values for base constraints this.cons.setTimeLimit( msLimit); this.cons.setReferralFollowing( doReferrals); this.cons.setHopLimit( hop_limit); setReferralHandler( handler); return; }
constraints.setTimeLimit(1000); constraints.setReferralFollowing(true); constraints.setReferralHandler(new LDAPPluginReferralHandler(loginDN, password, context));
standardConstraints.setTimeLimit(connectionManager.getConfig().getOperationTimeout()); standardConstraints.setReferralFollowing(connectionManager.getConfig().isFollowReferrals());