本文整理汇总了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);
}
}
示例2: createBindRequest
import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
@NotNull
public BindRequest createBindRequest() {
return bindType.createBindRequest(username, password);
}
示例3: createBindRequest
import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@NotNull
BindRequest createBindRequest();
示例4: createBindRequest
import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
@NotNull
public BindRequest createBindRequest() {
return new SimpleBindRequest(bindDn, password);
}
示例5: createBindRequest
import com.unboundid.ldap.sdk.BindRequest; //导入依赖的package包/类
@Override
public @NotNull BindRequest createBindRequest() {
return new ANONYMOUSBindRequest();
}