org.apache.directory.ldap.client.api.LdapConnection.setTimeOut()方法的使用及代码示例

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

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

LdapConnection.setTimeOut介绍

[英]Set the timeout for the responses. We won't wait longer than this value.
[中]设置响应的超时时间。我们不会等待超过此值的时间。

代码示例

代码示例来源:origin: org.apache.directory.api/api-all

/**
 * {@inheritDoc}
 */
@Override
public void setTimeOut( long timeOut )
{
  connection.setTimeOut( timeOut );
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-api

/**
 * {@inheritDoc}
 */
@Override
public void setTimeOut( long timeOut )
{
  connection.setTimeOut( timeOut );
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-all

/**
 * {@inheritDoc}
 */
@Override
public void setTimeOut( long timeOut )
{
  connection.setTimeOut( timeOut );
}

代码示例来源:origin: org.apache.directory.api/api-all

/**
 * {@inheritDoc}
 */
@Override
public LdapConnection configureConnection( LdapConnection connection )
{
  connection.setTimeOut( timeout );
  connection.setBinaryAttributeDetector( connectionConfig.getBinaryAttributeDetector() );
  return connection;
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-all

/**
 * {@inheritDoc}
 */
@Override
public LdapConnection configureConnection( LdapConnection connection )
{
  connection.setTimeOut( timeout );
  connection.setBinaryAttributeDetector( connectionConfig.getBinaryAttributeDetector() );
  return connection;
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-api

/**
 * {@inheritDoc}
 */
@Override
public LdapConnection configureConnection( LdapConnection connection )
{
  connection.setTimeOut( timeout );
  connection.setBinaryAttributeDetector( connectionConfig.getBinaryAttributeDetector() );
  return connection;
}

代码示例来源:origin: org.apache.directory.server/apacheds-core-integ

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

代码示例来源:origin: com.qwazr/qwazr-library-ldap

@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;
}

代码示例来源:origin: org.apache.directory.server/ldap-client-test

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

代码示例来源:origin: org.apache.directory.fortress/fortress-core

ld.setTimeOut( 0 );

相关文章