当前位置: 首页>>代码示例>>Java>>正文


Java BindRequest类代码示例

本文整理汇总了Java中com.unboundid.ldap.sdk.BindRequest的典型用法代码示例。如果您正苦于以下问题:Java BindRequest类的具体用法?Java BindRequest怎么用?Java BindRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BindRequest类属于com.unboundid.ldap.sdk包,在下文中一共展示了BindRequest类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeFromJson

import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
public void initializeFromJson(JsonNode node) {
    if(node == null){
        LOGGER.warn("Attempted to initizlize an LDAP datasource from a null JsonNode.");
        return;
    }

    databaseName = parseJsonNode(node, LDAP_CONFIG_DATABASE, true).asText();

    //TODO Add functionality for other BindRequest Types
    BindRequest bindRequest = new SimpleBindRequest(
            parseJsonNode(node, LDAP_CONFIG_BINDABLE_DB, true).asText(),
            parseJsonNode(node, LDAP_CONFIG_PASSWORD, true).asText());

    int initialConnections = parseInitialConnections(node);
    int maxConnections = parseMaxConnections(node);
    Map<String, Integer> hostPortMap = parseServers(node);

    String[] hosts = hostPortMap.keySet().toArray(new String[0]);

    ServerSet serverSet;
    if(hostPortMap.size() == 1){
        serverSet = new SingleServerSet(hosts[0], hostPortMap.get(hosts[0]));
    }
    else{
        int[] ports = new int[hosts.length];
        for(int x = 0; x < ports.length; x++){
            ports[x] = hostPortMap.get(hosts[x]);
        }

        //TODO Add support for other ServerSet types.
        serverSet = new RoundRobinServerSet(hosts, ports);
    }

    try{
        connectionPool = new LDAPConnectionPool(serverSet, bindRequest, initialConnections, maxConnections);
    }
    catch(LDAPException e) {
        throw new LdapConfigException("Unable to connect to ldap server(s).", e);
    }
}
 
开发者ID:lightblue-platform,项目名称:lightblue-ldap,代码行数:42,代码来源:LdapDataSourceConfiguration.java

示例2: createBindRequest

import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
@NotNull
public BindRequest createBindRequest() {
  return bindType.createBindRequest(username, password);
}
 
开发者ID:bozaro,项目名称:git-as-svn,代码行数:6,代码来源:LdapBindSimple.java

示例3: createBindRequest

import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@NotNull
BindRequest createBindRequest();
 
开发者ID:bozaro,项目名称:git-as-svn,代码行数:3,代码来源:LdapBind.java

示例4: createBindRequest

import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
@NotNull
public BindRequest createBindRequest() {
  return new SimpleBindRequest(bindDn, password);
}
 
开发者ID:bozaro,项目名称:git-as-svn,代码行数:6,代码来源:LdapBindDn.java

示例5: createBindRequest

import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
public @NotNull BindRequest createBindRequest() {
  return new ANONYMOUSBindRequest();
}
 
开发者ID:bozaro,项目名称:git-as-svn,代码行数:5,代码来源:LdapBindAnonymous.java


注:本文中的com.unboundid.ldap.sdk.BindRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。