本文整理了Java中com.unboundid.ldap.sdk.LDAPConnection.processExtendedOperation()
方法的一些代码示例,展示了LDAPConnection.processExtendedOperation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.processExtendedOperation()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.LDAPConnection
类名称:LDAPConnection
方法名:processExtendedOperation
[英]Processes the provided extended request. Note that because some types of extended operations return unusual result codes under "normal" conditions, the server may not always throw an exception for a failed extended operation like it does for other types of operations. It will throw an exception under conditions where there appears to be a problem with the connection or the server to which the connection is established, but there may be many circumstances in which an extended operation is not processed correctly but this method does not throw an exception. In the event that no exception is thrown, it is the responsibility of the caller to interpret the result to determine whether the operation was processed as expected.
Note that extended operations which may change the state of this connection (e.g., the StartTLS extended operation, which will add encryption to a previously-unencrypted connection) should not be invoked while any other operations are active on the connection. It is recommended that all active operations be abandoned, canceled, or allowed to complete before attempting to process an extended operation that may change the state of this connection.
[中]处理提供的扩展请求。请注意,由于某些类型的扩展操作在“正常”条件下返回异常结果代码,因此服务器可能不会像对其他类型的操作一样,总是对失败的扩展操作引发异常。在连接或建立连接的服务器出现问题的情况下,它将引发异常,但在许多情况下,扩展操作未正确处理,但此方法不会引发异常。在没有引发异常的情况下,调用方负责解释结果,以确定操作是否按预期处理。
请注意,当连接上的任何其他操作处于活动状态时,不应调用可能更改此连接状态的扩展操作(例如,StartTLS扩展操作,它将向以前未加密的连接添加加密)。建议在尝试处理可能更改此连接状态的扩展操作之前放弃、取消或允许完成所有活动操作。
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* {@inheritDoc}
*/
public void processPreAuthenticatedConnection(final LDAPConnection connection)
throws LDAPException
{
final ExtendedResult result =
connection.processExtendedOperation(request.duplicate());
if (result.getResultCode() != ResultCode.SUCCESS)
{
throw new LDAPExtendedOperationException(result);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
return processExtendedOperation(new ExtendedRequest(requestOID));
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
return processExtendedOperation(new ExtendedRequest(requestOID,
requestValue));
代码示例来源:origin: otto-de/edison-microservice
public LDAPConnection buildLdapConnection() throws GeneralSecurityException, LDAPException {
final LDAPConnection ldapConnection = new LDAPConnection(ldapProperties.getHost(), ldapProperties.getPort());
ldapConnection.processExtendedOperation(new StartTLSExtendedRequest(SSL_UTIL.createSSLContext()));
return ldapConnection;
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
return processExtendedOperation(new ExtendedRequest(requestOID));
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
return processExtendedOperation(new ExtendedRequest(requestOID,
requestValue));
代码示例来源:origin: com.gitblit.fathom/fathom-security-ldap
ExtendedResult extendedResult = conn.processExtendedOperation(
new StartTLSExtendedRequest(sslUtil.createSSLContext()));
if (extendedResult.getResultCode() != ResultCode.SUCCESS) {
代码示例来源:origin: gitblit/fathom
ExtendedResult extendedResult = conn.processExtendedOperation(
new StartTLSExtendedRequest(sslUtil.createSSLContext()));
if (extendedResult.getResultCode() != ResultCode.SUCCESS) {
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
conn.processExtendedOperation(extendedRequest);
releaseConnection(conn);
return result;
newConn.processExtendedOperation(extendedRequest);
releaseConnection(newConn);
return result;
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
conn.processExtendedOperation(extendedRequest);
releaseConnection(conn);
return result;
newConn.processExtendedOperation(extendedRequest);
releaseConnection(newConn);
return result;
代码示例来源:origin: de.otto.edison/edison-togglz
ldapConnection.processExtendedOperation(extRequest);
BindResult bindResult = ldapConnection.bind(
ldapProperties.getRdnIdentifier() + "=" + credentials.getUsername() + "," +
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
ldapConnection.processExtendedOperation(extendedRequest);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* {@inheritDoc}
*/
public void processPreAuthenticatedConnection(final LDAPConnection connection)
throws LDAPException
{
final StartTLSExtendedRequest startTLSRequest;
if (sslContext == null)
{
startTLSRequest = new StartTLSExtendedRequest(sslSocketFactory);
}
else
{
startTLSRequest = new StartTLSExtendedRequest(sslContext);
}
// Since the StartTLS processing will occur during the course of
// establishing the connection for use in the pool, set the connect timeout
// for the operation to be equal to the connect timeout from the connection
// options.
final LDAPConnectionOptions opts = connection.getConnectionOptions();
startTLSRequest.setResponseTimeoutMillis(opts.getConnectTimeoutMillis());
final ExtendedResult r =
connection.processExtendedOperation(startTLSRequest);
if (! r.getResultCode().equals(ResultCode.SUCCESS))
{
throw new LDAPExtendedOperationException(r);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* {@inheritDoc}
*/
public void processPreAuthenticatedConnection(final LDAPConnection connection)
throws LDAPException
{
final StartTLSExtendedRequest startTLSRequest;
if (sslContext == null)
{
startTLSRequest = new StartTLSExtendedRequest(sslSocketFactory);
}
else
{
startTLSRequest = new StartTLSExtendedRequest(sslContext);
}
// Since the StartTLS processing will occur during the course of
// establishing the connection for use in the pool, set the connect timeout
// for the operation to be equal to the connect timeout from the connection
// options.
final LDAPConnectionOptions opts = connection.getConnectionOptions();
startTLSRequest.setResponseTimeoutMillis(opts.getConnectTimeoutMillis());
final ExtendedResult r =
connection.processExtendedOperation(startTLSRequest);
if (! r.getResultCode().equals(ResultCode.SUCCESS))
{
throw new LDAPExtendedOperationException(r);
}
}
代码示例来源:origin: com.nimbusds/common
extResult = con.processExtendedOperation(extRequest);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
connection.processExtendedOperation(
new StartTLSExtendedRequest(startTLSSocketFactory));
if (! extendedResult.getResultCode().equals(ResultCode.SUCCESS))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
connection.processExtendedOperation(new StartTLSExtendedRequest(
startTLSSocketFactory[serverIndex]));
if (! extendedResult.getResultCode().equals(ResultCode.SUCCESS))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
conn.processExtendedOperation(connStartTLSRequest);
if (startTLSResult.getResultCode() != ResultCode.SUCCESS)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
conn.processExtendedOperation(connStartTLSRequest);
if (startTLSResult.getResultCode() != ResultCode.SUCCESS)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
conn.processExtendedOperation(extendedRequest);
setResponseControls(result);
内容来源于网络,如有侵权,请联系作者删除!