| | |
| | | |
| | | |
| | | |
| | | import static org.forgerock.opendj.ldap.ErrorResultException.newErrorResult; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.InetSocketAddress; |
| | | import java.util.List; |
| | |
| | | if (connectionInvalidReason != null) |
| | | { |
| | | return new CompletedFutureResult<Void>( |
| | | ErrorResultException.wrap(connectionInvalidReason), messageID); |
| | | newErrorResult(connectionInvalidReason), messageID); |
| | | } |
| | | if (bindOrStartTLSInProgress.get()) |
| | | { |
| | |
| | | ResultCode.OPERATIONS_ERROR).setDiagnosticMessage( |
| | | "Bind or Start TLS operation in progress"); |
| | | return new CompletedFutureResult<Void>( |
| | | ErrorResultException.wrap(errorResult), messageID); |
| | | newErrorResult(errorResult), messageID); |
| | | } |
| | | |
| | | // First remove the future associated with the request to be abandoned. |
| | |
| | | ResultCode.CLIENT_SIDE_ENCODING_ERROR).setCause(e); |
| | | connectionErrorOccurred(errorResult); |
| | | return new CompletedFutureResult<Void>( |
| | | ErrorResultException.wrap(errorResult), messageID); |
| | | newErrorResult(errorResult), messageID); |
| | | } |
| | | } |
| | | |
| | |
| | | .newResult(ResultCode.CLIENT_SIDE_LOCAL_ERROR) |
| | | .setDiagnosticMessage( |
| | | "An error occurred while creating a bind context").setCause(e); |
| | | final ErrorResultException error = ErrorResultException.wrap(errorResult); |
| | | final ErrorResultException error = ErrorResultException.newErrorResult(errorResult); |
| | | if (resultHandler != null) |
| | | { |
| | | resultHandler.handleErrorResult(error); |
| | |
| | | { |
| | | if (connectionInvalidReason != null) |
| | | { |
| | | throw ErrorResultException.wrap(connectionInvalidReason); |
| | | throw newErrorResult(connectionInvalidReason); |
| | | } |
| | | pendingRequests.put(newMsgID, request); |
| | | } |
| | |
| | | for (final ConnectionEventListener listener : listeners) |
| | | { |
| | | listener.handleConnectionError(isDisconnectNotification, |
| | | ErrorResultException.wrap(reason)); |
| | | newErrorResult(reason)); |
| | | } |
| | | } |
| | | } |