com.novell.ldap.LDAPConnection.setConstraints()方法的使用及代码示例

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

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

LDAPConnection.setConstraints介绍

[英]Sets the constraints that apply to all operations performed through this connection (unless a different set of constraints is specified when calling an operation method). An LDAPSearchConstraints object which is passed to this method sets all constraints, while an LDAPConstraints object passed to this method sets only base constraints.
[中]设置应用于通过此连接执行的所有操作的约束(除非在调用操作方法时指定了一组不同的约束)。传递到此方法的LDAPSearchConstraints对象设置所有约束,而传递到此方法的LDAPConstraints对象仅设置基本约束。

代码示例

代码示例来源:origin: glyptodon/guacamole-client

ldapConnection.setConstraints(ldapConstraints);

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Sets the constraints that apply to all operations performed through
 * this connection.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#setConstraints(com.novell.ldap.LDAPConstraints)">
    com.novell.ldap.LDAPConnection.setConstraints(LDAPConstraints)</a>
 */
public void setConstraints(LDAPConstraints cons)
{
  conn.setConstraints( cons.getWrappedObject());
  return;
}

代码示例来源:origin: sakaiproject/sakai

/**
 * 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);
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

constraints.setReferralFollowing(true);
constraints.setReferralHandler(new LDAPPluginReferralHandler(loginDN, password, context));
this.connection.setConstraints(constraints);

代码示例来源:origin: org.xwiki.platform/xwiki-platform-ldap-authenticator

constraints.setReferralFollowing(true);
constraints.setReferralHandler(new LDAPPluginReferralHandler(loginDN, password, context));
this.connection.setConstraints(constraints);

代码示例来源:origin: com.novell.ldap/jldap

rconn.setConstraints( defSearchCons);
LDAPUrl url = new LDAPUrl(referrals[i]);
rconn.connect(url.getHost(),url.getPort());

相关文章