本文整理了Java中org.apache.directory.ldap.client.api.LdapConnection.bind()
方法的一些代码示例,展示了LdapConnection.bind()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LdapConnection.bind()
方法的具体详情如下:
包路径:org.apache.directory.ldap.client.api.LdapConnection
类名称:LdapConnection
方法名:bind
[英]Anonymous Bind on a server.
[中]服务器上的匿名绑定。
代码示例来源:origin: HubSpot/Singularity
@Override
public com.google.common.base.Optional<Boolean> isHealthy() {
try {
final LdapConnection connection = connectionPool.getConnection();
try {
if (connection.isConnected() && connection.isAuthenticated()) {
connection.bind();
try {
return com.google.common.base.Optional.of(true);
} finally {
connection.unBind();
}
}
} finally {
connectionPool.releaseConnection(connection);
}
} catch (LdapException e) {
LOG.warn("LdapException caught when checking health", e);
exceptionNotifier.notify(String.format("LdapException caught when checking health (%s)", e.getMessage()), e);
}
return com.google.common.base.Optional.of(false);
}
代码示例来源:origin: HubSpot/Singularity
checkState(connection.isConnected(), "not connected");
checkState(connection.isAuthenticated(), "not authenticated");
connection.bind();
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind( Dn name ) throws LdapException
{
connection.bind( name );
bindCalled = true;
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public BindResponse bind( BindRequest bindRequest ) throws LdapException
{
BindResponse response = connection.bind( bindRequest );
bindCalled = true;
return response;
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public void bind() throws LdapException
{
connection.bind();
bindCalled = true;
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public void bind( String name, String credentials ) throws LdapException
{
connection.bind( name, credentials );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public void bind( Dn name, String credentials ) throws LdapException
{
connection.bind( name, credentials );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public BindResponse bind( BindRequest bindRequest ) throws LdapException
{
return connection.bind( bindRequest );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public void bind( String name ) throws LdapException
{
connection.bind( name );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public BindResponse bind( BindRequest bindRequest ) throws LdapException
{
return connection.bind( bindRequest );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind( String name ) throws LdapException
{
connection.bind( name );
bindCalled = true;
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind( Dn name, String credentials ) throws LdapException
{
connection.bind( name, credentials );
bindCalled = true;
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind() throws LdapException
{
connection.bind();
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind( String name ) throws LdapException
{
connection.bind( name );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public BindResponse bind( BindRequest bindRequest ) throws LdapException
{
return connection.bind( bindRequest );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public void bind() throws LdapException
{
connection.bind();
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind( String name, String credentials ) throws LdapException
{
connection.bind( name, credentials );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void bind( Dn name, String credentials ) throws LdapException
{
connection.bind( name, credentials );
}
代码示例来源:origin: org.apache.directory.client.ldap/ldap-client-api
/**
* {@inheritDoc}
*/
public Object makeObject() throws Exception
{
LOG.debug( "creating a LDAP connection" );
LdapConnection connection = new LdapConnection( config );
connection.bind( config.getName(), config.getCredentials() );
return connection;
}
代码示例来源:origin: com.qwazr/qwazr-library-ldap
@JsonIgnore
public Entry getEntry(final LdapConnection connection, final String filter, final String... attributes)
throws LdapException, CursorException, IOException {
connection.bind();
try (final EntryCursor cursor = connection.search(baseDn, filter, SearchScope.SUBTREE, attributes)) {
if (!cursor.next())
return null;
return cursor.get();
}
}
内容来源于网络,如有侵权,请联系作者删除!