本文整理了Java中com.unboundid.ldap.sdk.LDAPConnection.reconnect()
方法的一些代码示例,展示了LDAPConnection.reconnect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.reconnect()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.LDAPConnection
类名称:LDAPConnection
方法名:reconnect
[英]Attempts to re-establish a connection to the server and re-authenticate if appropriate.
[中]尝试重新建立与服务器的连接,并在适当时重新验证。
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Registers the provided response acceptor with the connection reader.
*
* @param messageID The message ID for which the acceptor is to be
* registered.
* @param responseAcceptor The response acceptor to register.
*
* @throws LDAPException If another message acceptor is already registered
* with the provided message ID.
*/
void registerResponseAcceptor(final int messageID,
final ResponseAcceptor responseAcceptor)
throws LDAPException
{
if (needsReconnect.compareAndSet(true, false))
{
reconnect();
}
final LDAPConnectionInternals internals = connectionInternals;
if (internals == null)
{
throw new LDAPException(ResultCode.SERVER_DOWN,
ERR_CONN_NOT_ESTABLISHED.get());
}
else
{
internals.registerResponseAcceptor(messageID, responseAcceptor);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Registers the provided response acceptor with the connection reader.
*
* @param messageID The message ID for which the acceptor is to be
* registered.
* @param responseAcceptor The response acceptor to register.
*
* @throws LDAPException If another message acceptor is already registered
* with the provided message ID.
*/
void registerResponseAcceptor(final int messageID,
final ResponseAcceptor responseAcceptor)
throws LDAPException
{
if (needsReconnect.compareAndSet(true, false))
{
reconnect();
}
final LDAPConnectionInternals internals = connectionInternals;
if (internals == null)
{
throw new LDAPException(ResultCode.SERVER_DOWN,
ERR_CONN_NOT_ESTABLISHED.get());
}
else
{
internals.registerResponseAcceptor(messageID, responseAcceptor);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Sends the provided LDAP message to the server over this connection.
*
* @param message The LDAP message to send to the target server.
*
* @throws LDAPException If a problem occurs while sending the request.
*/
void sendMessage(final LDAPMessage message)
throws LDAPException
{
if (needsReconnect.compareAndSet(true, false))
{
reconnect();
}
final LDAPConnectionInternals internals = connectionInternals;
if (internals == null)
{
throw new LDAPException(ResultCode.SERVER_DOWN,
ERR_CONN_NOT_ESTABLISHED.get());
}
else
{
@SuppressWarnings("deprecation")
final boolean autoReconnect = connectionOptions.autoReconnect();
internals.sendMessage(message, autoReconnect);
lastCommunicationTime = System.currentTimeMillis();
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Sends the provided LDAP message to the server over this connection.
*
* @param message The LDAP message to send to the target server.
*
* @throws LDAPException If a problem occurs while sending the request.
*/
void sendMessage(final LDAPMessage message)
throws LDAPException
{
if (needsReconnect.compareAndSet(true, false))
{
reconnect();
}
final LDAPConnectionInternals internals = connectionInternals;
if (internals == null)
{
throw new LDAPException(ResultCode.SERVER_DOWN,
ERR_CONN_NOT_ESTABLISHED.get());
}
else
{
@SuppressWarnings("deprecation")
final boolean autoReconnect = connectionOptions.autoReconnect();
internals.sendMessage(message, autoReconnect);
lastCommunicationTime = System.currentTimeMillis();
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
case ResultCode.DECODING_ERROR_INT_VALUE:
case ResultCode.CONNECT_ERROR_INT_VALUE:
connection.reconnect();
return processSync(connection, depth, false);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
connection.reconnect();
if ((numEntries == 0) && (numReferences == 0))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
connection.reconnect();
if ((numEntries == 0) && (numReferences == 0))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
if (autoReconnect && (! closeRequested))
connection.reconnect();
connection.registerResponseAcceptor(messageID, responseAcceptor);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
if (autoReconnect && (! closeRequested))
connection.reconnect();
connection.registerResponseAcceptor(messageID, responseAcceptor);
内容来源于网络,如有侵权,请联系作者删除!