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

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

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

LDAPConnection.getPort介绍

[英]Returns the port number of the LDAP server to which the object is or was last connected.
[中]返回对象当前或上次连接到的LDAP服务器的端口号。

代码示例

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

/**
 * Returns the port number of the LDAP server to which the object is or
 * was last connected.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#getPort()">
    com.novell.ldap.LDAPConnection.getPort()</a>
 */
public int getPort()
{
  return conn.getPort();
}

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

/**
 * Get the cache with the provided name for a particular LDAP server.
 * 
 * @param configuration the configuration to use to create the cache and to find it if it's already created.
 * @param context the XWiki context.
 * @return the cache.
 * @throws CacheException error when creating the cache.
 */
public Cache<Map<String, String>> getCache(CacheConfiguration configuration, XWikiContext context)
  throws CacheException
{
  Cache<Map<String, String>> cache;
  String cacheKey = getUidAttributeName() + "." + this.connection.getConnection().getHost() + ":"
    + this.connection.getConnection().getPort();
  Map<String, Cache<Map<String, String>>> cacheMap;
  if (cachePool.containsKey(cacheKey)) {
    cacheMap = cachePool.get(cacheKey);
  } else {
    cacheMap = new HashMap<String, Cache<Map<String, String>>>();
    cachePool.put(cacheKey, cacheMap);
  }
  cache = cacheMap.get(configuration.getConfigurationId());
  if (cache == null) {
    cache = Utils.getComponent(CacheManager.class).createNewCache(configuration);
    cacheMap.put(configuration.getConfigurationId(), cache);
  }
  return cache;
}

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

+ this.connection.getConnection().getPort();

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

url.getHost() + "-" + rconn.getHost() +
      " & " +
      url.getPort() + "-" + rconn.getPort());
  (url.getPort() == rconn.getPort())) {
refInfo = new ReferralInfo(rconn, referrals, url);
break;

相关文章