本文整理了Java中com.novell.ldap.LDAPConnection.isConnected()
方法的一些代码示例,展示了LDAPConnection.isConnected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.isConnected()
方法的具体详情如下:
包路径:com.novell.ldap.LDAPConnection
类名称:LDAPConnection
方法名:isConnected
[英]Indicates whether the connection represented by this object is open at this time.
[中]指示此对象表示的连接此时是否打开。
代码示例来源:origin: stackoverflow.com
public static List<SearchResultEntry> getResults(LDAPConnection connection, String baseDN, String filter) throws LDAPSearchException {
SearchResult searchResult;
if (connection.isConnected()) {
searchResult = connection.search(baseDN, SearchScope.ONE, filter);
return searchResult.getSearchEntries();
}
return null;
}
代码示例来源:origin: com.novell.ldap/jldap
/**
* Indicates whether the connection represented by this object is open
* at this time.
*
* @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#isConnected()">
com.novell.ldap.LDAPConnection.isConnected()</a>
*/
public boolean isConnected()
{
return conn.isConnected();
}
代码示例来源:origin: stackoverflow.com
LDAPConnection ldc = new LDAPConnection()
ldc.connect(...);
if (ldc.isConnected())
{
do good stuff
}
else
{
getLDAPConnection(...);
}
代码示例来源:origin: com.bbossgroups.pdp/pdp-ldap
if (lc.isConnected()) {
try {
lc.disconnect();
代码示例来源:origin: com.bbossgroups.pdp/pdp-ldap
logger.warn("getSearchDn error", e);
} finally {
if (lc.isConnected()) {
try {
lc.disconnect();
内容来源于网络,如有侵权,请联系作者删除!