| | |
| | | import org.opends.server.types.SearchResultReference; |
| | | |
| | | import static org.opends.server.loggers.Access.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugData; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugProtocolElement; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.Error.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | extends ClientConnection |
| | | implements TLSCapableConnection |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.protocols.ldap.LDAPClientConnection"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME, String.valueOf(connectionHandler), |
| | | String.valueOf(clientChannel)); |
| | | |
| | | this.connectionHandler = connectionHandler; |
| | | this.clientChannel = clientChannel; |
| | |
| | | */ |
| | | public long getConnectionID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConnectionID"); |
| | | |
| | | return connectionID; |
| | | } |
| | |
| | | */ |
| | | public ConnectionHandler getConnectionHandler() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConnectionHandler"); |
| | | |
| | | return connectionHandler; |
| | | } |
| | |
| | | */ |
| | | public LDAPRequestHandler getRequestHandler() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRequestHandler"); |
| | | |
| | | return requestHandler; |
| | | } |
| | |
| | | */ |
| | | public void setRequestHandler(LDAPRequestHandler requestHandler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRequestHandler", |
| | | String.valueOf(requestHandler)); |
| | | |
| | | this.requestHandler = requestHandler; |
| | | } |
| | |
| | | */ |
| | | public SocketChannel getSocketChannel() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSocketChannel"); |
| | | |
| | | return clientChannel; |
| | | } |
| | |
| | | */ |
| | | public String getProtocol() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProtocol"); |
| | | |
| | | return protocol; |
| | | } |
| | |
| | | */ |
| | | public String getClientAddress() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getClientAddress"); |
| | | |
| | | return clientAddress; |
| | | } |
| | |
| | | */ |
| | | public int getClientPort() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getClientPort"); |
| | | |
| | | return clientPort; |
| | | } |
| | |
| | | */ |
| | | public String getServerAddress() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getServerAddress"); |
| | | |
| | | return serverAddress; |
| | | } |
| | |
| | | */ |
| | | public int getServerPort() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getServerPort"); |
| | | |
| | | return serverPort; |
| | | } |
| | |
| | | */ |
| | | public InetAddress getRemoteAddress() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRemoteAddress"); |
| | | |
| | | return clientChannel.socket().getInetAddress(); |
| | | } |
| | |
| | | */ |
| | | public InetAddress getLocalAddress() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getLocalAddress"); |
| | | |
| | | return clientChannel.socket().getLocalAddress(); |
| | | } |
| | |
| | | */ |
| | | public boolean isSecure() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isSecure"); |
| | | |
| | | return securityProvider.isSecure(); |
| | | } |
| | |
| | | */ |
| | | public ConnectionSecurityProvider getConnectionSecurityProvider() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConnectionSecurityProvider"); |
| | | |
| | | return securityProvider; |
| | | } |
| | |
| | | public void setConnectionSecurityProvider(ConnectionSecurityProvider |
| | | securityProvider) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setConnectionSecurityProvider", |
| | | String.valueOf(securityProvider)); |
| | | |
| | | this.securityProvider = securityProvider; |
| | | |
| | |
| | | */ |
| | | public String getSecurityMechanism() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSecurityMechanism"); |
| | | |
| | | return securityProvider.getSecurityMechanismName(); |
| | | } |
| | |
| | | */ |
| | | public long nextOperationID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "nextOperationID"); |
| | | |
| | | return nextOperationID.getAndIncrement(); |
| | | } |
| | |
| | | */ |
| | | public void sendResponse(Operation operation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendResponse", String.valueOf(operation)); |
| | | |
| | | LDAPMessage message = operationToResponseLDAPMessage(operation); |
| | | if (message != null) |
| | |
| | | */ |
| | | private LDAPMessage operationToResponseLDAPMessage(Operation operation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "operationToResponseLDAPMessage", |
| | | String.valueOf(operation)); |
| | | |
| | | ResultCode resultCode = operation.getResultCode(); |
| | | if (resultCode == null) |
| | |
| | | public void sendSearchEntry(SearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendSearchEntry", |
| | | String.valueOf(searchOperation), |
| | | String.valueOf(searchEntry)); |
| | | |
| | | SearchResultEntryProtocolOp protocolOp = |
| | | new SearchResultEntryProtocolOp(searchEntry); |
| | |
| | | public boolean sendSearchReference(SearchOperation searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendSearchReference", |
| | | String.valueOf(searchOperation), |
| | | String.valueOf(searchReference)); |
| | | |
| | | |
| | | // Make sure this is not an LDAPv2 client. If it is, then they can't see |
| | |
| | | protected boolean sendIntermediateResponseMessage( |
| | | IntermediateResponse intermediateResponse) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendIntermediateResponseMessage", |
| | | String.valueOf(intermediateResponse)); |
| | | |
| | | IntermediateResponseProtocolOp protocolOp = |
| | | new IntermediateResponseProtocolOp(intermediateResponse.getOID(), |
| | |
| | | private void sendLDAPMessage(ConnectionSecurityProvider secProvider, |
| | | LDAPMessage message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendLDAPMessage", String.valueOf(message)); |
| | | |
| | | ASN1Element messageElement = message.encode(); |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | assert debugProtocolElementWritten(CLASS_NAME, "sendLDAPMessage", |
| | | message); |
| | | assert debugProtocolElementWritten(CLASS_NAME, "sendLDAPMessage", |
| | | messageElement); |
| | | debugProtocolElement(DebugLogLevel.VERBOSE, message); |
| | | debugProtocolElement(DebugLogLevel.VERBOSE, messageElement); |
| | | |
| | | messageBuffer.rewind(); |
| | | assert debugBytesWritten(CLASS_NAME, "sendLDAPMessage", |
| | | messageBuffer); |
| | | if (debugEnabled()) |
| | | { |
| | | debugData(DebugLogLevel.VERBOSE, messageBuffer); |
| | | } |
| | | |
| | | if (keepStats) |
| | | { |
| | | statTracker.updateMessageWritten(message, bytesWritten); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | catch (@Deprecated Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "sendLDAPMessage", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We were unable to send the message due to some other internal |
| | | // problem. Disconnect from the client and return. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "sendLDAPMessage", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // FIXME -- Log a message or something |
| | | disconnect(DisconnectReason.SERVER_ERROR, true, -1, String.valueOf(e), |
| | |
| | | boolean sendNotification, String message, |
| | | int messageID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "disconnect", |
| | | String.valueOf(disconnectReason), |
| | | String.valueOf(sendNotification), String.valueOf(message), |
| | | String.valueOf(messageID)); |
| | | |
| | | |
| | | // If we are already in the middle of a disconnect, then don't do anything. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "disconnect", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | | { |
| | |
| | | { |
| | | // In general, we don't care about any exception that might be thrown |
| | | // here. |
| | | assert debugException(CLASS_NAME, "disconnect", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | // In general, we don't care about any exception that might be thrown |
| | | // here. |
| | | assert debugException(CLASS_NAME, "disconnect", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "disconnect", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public Collection<Operation> getOperationsInProgress() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOperationsInProgress"); |
| | | |
| | | return operationsInProgress.values(); |
| | | } |
| | |
| | | */ |
| | | public Operation getOperationInProgress(int messageID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOperationInProgress", |
| | | String.valueOf(messageID)); |
| | | |
| | | return operationsInProgress.get(messageID); |
| | | } |
| | |
| | | public void addOperationInProgress(Operation operation) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addOperationInProgress", |
| | | String.valueOf(operation)); |
| | | |
| | | int messageID = operation.getMessageID(); |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "addOperationInProgress", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | operationsInProgress.remove(messageID); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "addOperationInProgress", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_CLIENT_CANNOT_ENQUEUE; |
| | | String message = getMessage(msgID, stackTraceToSingleLineString(e)); |
| | |
| | | */ |
| | | public boolean removeOperationInProgress(int messageID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeOperationInProgress", |
| | | String.valueOf(messageID)); |
| | | |
| | | Operation operation = operationsInProgress.remove(messageID); |
| | | return (operation != null); |
| | |
| | | public CancelResult cancelOperation(int messageID, |
| | | CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancelOperation", |
| | | String.valueOf(messageID), String.valueOf(cancelRequest)); |
| | | |
| | | Operation op = operationsInProgress.get(messageID); |
| | | if (op == null) |
| | |
| | | */ |
| | | public void cancelAllOperations(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancelAllOperations", |
| | | String.valueOf(cancelRequest)); |
| | | |
| | | |
| | | // Make sure that no one can add any new operations. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "cancelAllOperations", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "cancelAllOperations", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | | { |
| | |
| | | public void cancelAllOperationsExcept(CancelRequest cancelRequest, |
| | | int messageID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancelAllOperationsExcept", |
| | | String.valueOf(cancelRequest), String.valueOf(messageID)); |
| | | |
| | | |
| | | // Make sure that no one can add any new operations. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "cancelAllOperationsExcept", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "cancelAllOperationsExcept", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | | { |
| | |
| | | */ |
| | | public boolean processDataRead(ByteBuffer buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processDataRead", String.valueOf(buffer)); |
| | | assert debugBytesRead(CLASS_NAME, "processDataRead", buffer); |
| | | if (debugEnabled()) |
| | | { |
| | | debugData(DebugLogLevel.VERBOSE, buffer); |
| | | } |
| | | |
| | | |
| | | int bytesAvailable = buffer.limit() - buffer.position(); |
| | |
| | | { |
| | | requestSequence = ASN1Sequence.decodeAsSequence(elementType, |
| | | elementValue); |
| | | assert debugProtocolElementRead(CLASS_NAME, "processDataRead", |
| | | requestSequence); |
| | | debugProtocolElement(DebugLogLevel.VERBOSE, requestSequence); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "processDataRead", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | disconnect(DisconnectReason.PROTOCOL_ERROR, true, |
| | | MSGID_LDAP_CLIENT_DECODE_ASN1_FAILED, |
| | |
| | | try |
| | | { |
| | | requestMessage = LDAPMessage.decode(requestSequence); |
| | | assert debugProtocolElementRead(CLASS_NAME, "processDataRead", |
| | | requestMessage); |
| | | debugProtocolElement(DebugLogLevel.VERBOSE, requestMessage); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "processDataRead", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | disconnect(DisconnectReason.PROTOCOL_ERROR, true, |
| | | MSGID_LDAP_CLIENT_DECODE_LDAP_MESSAGE_FAILED, |
| | |
| | | */ |
| | | private boolean processLDAPMessage(LDAPMessage message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processLDAPMessage", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | if (keepStats) |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "processLDAPMessage", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_DISCONNECT_DUE_TO_PROCESSING_FAILURE; |
| | | String msg = getMessage(msgID, message.getProtocolOpName(), |
| | | message.getMessageID(),String.valueOf(e)); |
| | | message.getMessageID(), String.valueOf(e)); |
| | | disconnect(DisconnectReason.SERVER_ERROR, true, msg, msgID); |
| | | return false; |
| | | } |
| | |
| | | private boolean processAbandonRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processAbandonRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | AbandonRequestProtocolOp protocolOp = message.getAbandonRequestProtocolOp(); |
| | |
| | | private boolean processAddRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processAddRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | // Create the add operation and add it into the work queue. |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processAddRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | AddResponseProtocolOp responseOp = |
| | | new AddResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processBindRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processBindRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | BindRequestProtocolOp protocolOp = message.getBindRequestProtocolOp(); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processBindRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | BindResponseProtocolOp responseOp = |
| | | new BindResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processCompareRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processCompareRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | CompareRequestProtocolOp protocolOp = message.getCompareRequestProtocolOp(); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processCompareRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | CompareResponseProtocolOp responseOp = |
| | | new CompareResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processDeleteRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processDeleteRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | DeleteRequestProtocolOp protocolOp = message.getDeleteRequestProtocolOp(); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processDeleteRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | DeleteResponseProtocolOp responseOp = |
| | | new DeleteResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processExtendedRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processExtendedRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | // See if this is an LDAPv2 client. If it is, then they should not be |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processExtendedRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | ExtendedResponseProtocolOp responseOp = |
| | | new ExtendedResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processModifyRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processModifyRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | ModifyRequestProtocolOp protocolOp = message.getModifyRequestProtocolOp(); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processModifyRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | ModifyResponseProtocolOp responseOp = |
| | | new ModifyResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processModifyDNRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processModifyDNRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | ModifyDNRequestProtocolOp protocolOp = |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processModifyDNRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | ModifyDNResponseProtocolOp responseOp = |
| | | new ModifyDNResponseProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processSearchRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processSearchRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | SearchRequestProtocolOp protocolOp = message.getSearchRequestProtocolOp(); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "processSearchRequest", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | SearchResultDoneProtocolOp responseOp = |
| | | new SearchResultDoneProtocolOp(de.getResultCode().getIntValue(), |
| | |
| | | private boolean processUnbindRequest(LDAPMessage message, |
| | | ArrayList<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processUnbindRequest", |
| | | String.valueOf(message)); |
| | | |
| | | |
| | | UnbindOperation unbindOp = |
| | |
| | | */ |
| | | public String getMonitorSummary() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMonitorSummary"); |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | buffer.append("connID=\""); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | | buffer.append("LDAP client connection from "); |
| | | buffer.append(clientAddress); |
| | |
| | | */ |
| | | public boolean tlsProtectionAvailable(StringBuilder unavailableReason) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "tlsProtectionAvailable", |
| | | "java.lang.StringBuilder"); |
| | | |
| | | |
| | | // Make sure that this client connection does not already have some other |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "tlsProtectionAvailable", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | tlsSecurityProvider = null; |
| | | |
| | |
| | | public void enableTLSConnectionSecurityProvider() |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "enableTLSConnectionSecurityProvider"); |
| | | |
| | | if (tlsSecurityProvider == null) |
| | | { |
| | |
| | | public void disableTLSConnectionSecurityProvider() |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "disableTLSConnectionSecurityProvider"); |
| | | |
| | | int msgID = MSGID_LDAP_TLS_CLOSURE_NOT_ALLOWED; |
| | | String message = getMessage(msgID); |
| | |
| | | public void sendClearResponse(Operation operation) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendClearResponse", |
| | | String.valueOf(operation)); |
| | | |
| | | if (clearSecurityProvider == null) |
| | | { |
| | |
| | | */ |
| | | public DN getKeyManagerProviderDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getKeyManagerProviderDN"); |
| | | |
| | | return connectionHandler.getKeyManagerProviderDN(); |
| | | } |
| | |
| | | */ |
| | | public DN getTrustManagerProviderDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTrustManagerProviderDN"); |
| | | |
| | | return connectionHandler.getTrustManagerProviderDN(); |
| | | } |