本文整理了Java中com.unboundid.ldap.sdk.LDAPConnection.setConnectionOptions()
方法的一些代码示例,展示了LDAPConnection.setConnectionOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.setConnectionOptions()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.LDAPConnection
类名称:LDAPConnection
方法名:setConnectionOptions
[英]Specifies the set of connection options for this connection. Some changes may not take effect for operations already in progress, and some changes may not take effect for a connection that is already established.
[中]指定此连接的连接选项集。有些更改可能不会对正在进行的操作生效,有些更改可能不会对已建立的连接生效。
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Specifies the maximum length of time to wait for the connection to be
* established, in seconds.
*
* @param timeout The maximum length of time to wait for the connection to
* be established.
*/
public void setConnectTimeout(final int timeout)
{
final LDAPConnectionOptions options = conn.getConnectionOptions();
if (timeout > 0)
{
options.setConnectTimeoutMillis(1000 * timeout);
}
else
{
options.setConnectTimeoutMillis(0);
}
conn.setConnectionOptions(options);
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
c.setConnectionOptions(opts);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
c.setConnectionOptions(opts);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
c.setConnectionOptions(opts);
内容来源于网络,如有侵权,请联系作者删除!