Search in sources :

Example 11 with Message

use of org.apache.directory.api.ldap.model.message.Message in project directory-ldap-api by apache.

the class DelRequestTest method testDecodeDelRequestBadDN.

/**
 * Test the decoding of a full DelRequest
 */
@Test
public void testDecodeDelRequestBadDN() {
    Asn1Decoder ldapDecoder = new Asn1Decoder();
    ByteBuffer stream = ByteBuffer.allocate(0x27);
    stream.put(new byte[] { 0x30, // LDAPMessage ::= SEQUENCE {
    0x25, 0x02, 0x01, // messageID MessageID
    0x01, // DelRequest ::= [APPLICATION 10] LDAPDN;
    0x4A, 0x20, 'c', 'n', ':', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u', 's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm' });
    stream.flip();
    // Allocate a LdapMessage Container
    LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>(codec);
    // Decode a DelRequest PDU
    try {
        ldapDecoder.decode(stream, container);
    } catch (DecoderException de) {
        assertTrue(de instanceof ResponseCarryingException);
        Message response = ((ResponseCarryingException) de).getResponse();
        assertTrue(response instanceof DeleteResponseImpl);
        assertEquals(ResultCodeEnum.INVALID_DN_SYNTAX, ((DeleteResponseImpl) response).getLdapResult().getResultCode());
        return;
    }
    fail("We should not reach this point");
}
Also used : LdapMessageContainer(org.apache.directory.api.ldap.codec.api.LdapMessageContainer) DecoderException(org.apache.directory.api.asn1.DecoderException) ResponseCarryingException(org.apache.directory.api.ldap.codec.api.ResponseCarryingException) DeleteResponseImpl(org.apache.directory.api.ldap.model.message.DeleteResponseImpl) DeleteRequestDecorator(org.apache.directory.api.ldap.codec.decorators.DeleteRequestDecorator) Message(org.apache.directory.api.ldap.model.message.Message) Asn1Decoder(org.apache.directory.api.asn1.ber.Asn1Decoder) ByteBuffer(java.nio.ByteBuffer) Test(org.junit.Test) AbstractCodecServiceTest(org.apache.directory.api.ldap.codec.osgi.AbstractCodecServiceTest)

Example 12 with Message

use of org.apache.directory.api.ldap.model.message.Message in project directory-ldap-api by apache.

the class LdapDecoderTest method testDecode2Messages.

/**
 * Test the decoding of two messages in a PDU
 */
@Test
public void testDecode2Messages() throws Exception {
    LdapMessageContainer<MessageDecorator<? extends Message>> container = new LdapMessageContainer<MessageDecorator<? extends Message>>(codec);
    IoSession dummySession = new DummySession();
    dummySession.setAttribute(LdapDecoder.MESSAGE_CONTAINER_ATTR, container);
    ByteBuffer stream = ByteBuffer.allocate(0x6A);
    stream.put(new byte[] { // LDAPMessage ::=SEQUENCE {
    0x30, // LDAPMessage ::=SEQUENCE {
    0x33, 0x02, 0x01, // messageID MessageID
    0x01, 0x60, // CHOICE { ..., bindRequest BindRequest, ...
    0x2E, // BindRequest ::= APPLICATION[0] SEQUENCE {
    0x02, 0x01, // version INTEGER (1..127),
    0x03, 0x04, // name LDAPDN,
    0x1F, 'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a', 'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', (byte) 0x80, // authentication
    0x08, // ...
    'p', 'a', 's', 's', 'w', 'o', 'r', 'd', 0x30, // LDAPMessage ::=SEQUENCE {
    0x33, 0x02, 0x01, // messageID MessageID
    0x02, 0x60, // CHOICE { ..., bindRequest BindRequest, ...
    0x2E, // BindRequest ::= APPLICATION[0] SEQUENCE {
    0x02, 0x01, // version INTEGER (1..127),
    0x03, 0x04, // name LDAPDN,
    0x1F, 'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a', 'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', (byte) 0x80, // authentication
    0x08, // ...
    'p', 'a', 's', 's', 'w', 'o', 'r', 'd' });
    stream.flip();
    List<Message> result = new ArrayList<Message>();
    // Decode a BindRequest PDU
    try {
        decode(stream, container, result);
    } catch (DecoderException de) {
        de.printStackTrace();
        fail(de.getMessage());
    }
    // Check the decoded PDU
    BindRequest bindRequest = (BindRequest) (result.get(0));
    assertEquals(1, bindRequest.getMessageId());
    assertTrue(bindRequest.isVersion3());
    assertEquals("uid=akarasulu,dc=example,dc=com", bindRequest.getName().toString());
    assertTrue(bindRequest.isSimple());
    assertEquals("password", Strings.utf8ToString(bindRequest.getCredentials()));
    // The second message
    bindRequest = (BindRequest) (result.get(1));
    assertEquals(2, bindRequest.getMessageId());
    assertTrue(bindRequest.isVersion3());
    assertEquals("uid=akarasulu,dc=example,dc=com", bindRequest.getName().toString());
    assertTrue(bindRequest.isSimple());
    assertEquals("password", Strings.utf8ToString(bindRequest.getCredentials()));
}
Also used : LdapMessageContainer(org.apache.directory.api.ldap.codec.api.LdapMessageContainer) DecoderException(org.apache.directory.api.asn1.DecoderException) MessageDecorator(org.apache.directory.api.ldap.codec.api.MessageDecorator) Message(org.apache.directory.api.ldap.model.message.Message) ArrayList(java.util.ArrayList) BindRequest(org.apache.directory.api.ldap.model.message.BindRequest) DummySession(org.apache.mina.core.session.DummySession) ByteBuffer(java.nio.ByteBuffer) IoSession(org.apache.mina.core.session.IoSession) Test(org.junit.Test) AbstractCodecServiceTest(org.apache.directory.api.ldap.codec.osgi.AbstractCodecServiceTest)

Example 13 with Message

use of org.apache.directory.api.ldap.model.message.Message in project directory-ldap-api by apache.

the class LdapMessageTest method testDecodeUnBindRequestNoControls.

/**
 * Test the decoding of a LdapMessage with a large MessageId
 */
@Test
public void testDecodeUnBindRequestNoControls() {
    Asn1Decoder ldapDecoder = new Asn1Decoder();
    ByteBuffer stream = ByteBuffer.allocate(0x08);
    stream.put(new byte[] { // LDAPMessage ::=SEQUENCE {
    0x30, // LDAPMessage ::=SEQUENCE {
    0x06, 0x02, 0x02, 0x01, // messageID MessageID (500)
    (byte) 0xF4, 0x42, // CHOICE { ..., unbindRequest UnbindRequest,...
    0x00 // UnbindRequest ::= [APPLICATION 2] NULL
    });
    String decodedPdu = Strings.dumpBytes(stream.array());
    stream.flip();
    // Allocate a BindRequest Container
    LdapMessageContainer<UnbindRequestDecorator> container = new LdapMessageContainer<UnbindRequestDecorator>(codec);
    try {
        ldapDecoder.decode(stream, container);
    } catch (DecoderException de) {
        de.printStackTrace();
        fail(de.getMessage());
    }
    Message message = container.getMessage();
    assertEquals(500, message.getMessageId());
    // Check the length
    UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
    internalUnbindRequest.setMessageId(message.getMessageId());
    try {
        ByteBuffer bb = encoder.encodeMessage(internalUnbindRequest);
        // Check the length
        assertEquals(0x08, bb.limit());
        String encodedPdu = Strings.dumpBytes(bb.array());
        assertEquals(encodedPdu, decodedPdu);
    } catch (EncoderException ee) {
        ee.printStackTrace();
        fail(ee.getMessage());
    }
}
Also used : LdapMessageContainer(org.apache.directory.api.ldap.codec.api.LdapMessageContainer) DecoderException(org.apache.directory.api.asn1.DecoderException) EncoderException(org.apache.directory.api.asn1.EncoderException) Message(org.apache.directory.api.ldap.model.message.Message) UnbindRequestImpl(org.apache.directory.api.ldap.model.message.UnbindRequestImpl) UnbindRequestDecorator(org.apache.directory.api.ldap.codec.decorators.UnbindRequestDecorator) Asn1Decoder(org.apache.directory.api.asn1.ber.Asn1Decoder) ByteBuffer(java.nio.ByteBuffer) UnbindRequest(org.apache.directory.api.ldap.model.message.UnbindRequest) Test(org.junit.Test) AbstractCodecServiceTest(org.apache.directory.api.ldap.codec.osgi.AbstractCodecServiceTest)

Example 14 with Message

use of org.apache.directory.api.ldap.model.message.Message in project directory-ldap-api by apache.

the class LdapNetworkConnection method messageReceived.

/**
 * Handle the incoming LDAP messages. This is where we feed the cursor for search
 * requests, or call the listener.
 *
 * @param session The session that received a message
 * @param message The received message
 * @throws Exception If there is some error while processing the message
 */
@Override
public void messageReceived(IoSession session, Object message) throws Exception {
    // Feed the response and store it into the session
    if (message instanceof SslFilter.SslFilterMessage) {
        // This is a SSL message telling if the session has been secured or not
        HandshakeFuture handshakeFuture = (HandshakeFuture) ldapSession.getAttribute("HANDSHAKE_FUTURE");
        if (message == SslFilter.SESSION_SECURED) {
            // SECURED
            handshakeFuture.secured();
        } else {
            // UNSECURED
            handshakeFuture.cancel();
        }
        ldapSession.removeAttribute("HANDSHAKE_FUTURE");
        return;
    }
    Message response = (Message) message;
    if (LOG.isDebugEnabled()) {
        LOG.debug(I18n.msg(I18n.MSG_03243_MESSAGE_RECEIVED, response));
    }
    int messageId = response.getMessageId();
    // this check is necessary to prevent adding an abandoned operation's
    // result(s) to corresponding queue
    ResponseFuture<? extends Response> responseFuture = peekFromFutureMap(messageId);
    boolean isNoD = isNoticeOfDisconnect(response);
    if ((responseFuture == null) && !isNoD) {
        LOG.info("There is no future associated with the messageId {}, ignoring the message", messageId);
        return;
    }
    if (isNoD) {
        // close the session
        session.closeNow();
        return;
    }
    switch(response.getType()) {
        case ADD_RESPONSE:
            // Transform the response
            AddResponse addResponse = (AddResponse) response;
            AddFuture addFuture = (AddFuture) responseFuture;
            // remove the listener from the listener map
            if (LOG.isDebugEnabled()) {
                if (addResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    LOG.debug(I18n.msg(I18n.MSG_03209_ADD_SUCCESSFUL, addResponse));
                } else {
                    // We have had an error
                    LOG.debug(I18n.msg(I18n.MSG_03208_ADD_FAILED, addResponse));
                }
            }
            // Store the response into the future
            addFuture.set(addResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case BIND_RESPONSE:
            // Transform the response
            BindResponse bindResponse = (BindResponse) response;
            BindFuture bindFuture = (BindFuture) responseFuture;
            // remove the listener from the listener map
            if (bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                authenticated.set(true);
                // Everything is fine, return the response
                if (LOG.isDebugEnabled()) {
                    LOG.debug(I18n.msg(I18n.MSG_03202_BIND_SUCCESSFUL, bindResponse));
                }
            } else {
                // We have had an error
                if (LOG.isDebugEnabled()) {
                    LOG.debug(I18n.msg(I18n.MSG_03201_BIND_FAIL, bindResponse));
                }
            }
            // Store the response into the future
            bindFuture.set(bindResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case COMPARE_RESPONSE:
            // Transform the response
            CompareResponse compareResponse = (CompareResponse) response;
            CompareFuture compareFuture = (CompareFuture) responseFuture;
            // remove the listener from the listener map
            if (LOG.isDebugEnabled()) {
                if (compareResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    LOG.debug(I18n.msg(I18n.MSG_03215_COMPARE_SUCCESSFUL, compareResponse));
                } else {
                    // We have had an error
                    LOG.debug(I18n.msg(I18n.MSG_03214_COMPARE_FAILED, compareResponse));
                }
            }
            // Store the response into the future
            compareFuture.set(compareResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case DEL_RESPONSE:
            // Transform the response
            DeleteResponse deleteResponse = (DeleteResponse) response;
            DeleteFuture deleteFuture = (DeleteFuture) responseFuture;
            if (LOG.isDebugEnabled()) {
                if (deleteResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    LOG.debug(I18n.msg(I18n.MSG_03217_DELETE_SUCCESSFUL, deleteResponse));
                } else {
                    // We have had an error
                    LOG.debug(I18n.msg(I18n.MSG_03216_DELETE_FAILED, deleteResponse));
                }
            }
            // Store the response into the future
            deleteFuture.set(deleteResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case EXTENDED_RESPONSE:
            // Transform the response
            ExtendedResponse extendedResponse = (ExtendedResponse) response;
            ExtendedFuture extendedFuture = (ExtendedFuture) responseFuture;
            // remove the listener from the listener map
            if (LOG.isDebugEnabled()) {
                if (extendedResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    LOG.debug(I18n.msg(I18n.MSG_03219_EXTENDED_SUCCESSFUL, extendedResponse));
                } else {
                    // We have had an error
                    LOG.debug(I18n.msg(I18n.MSG_03218_EXTENDED_FAILED, extendedResponse));
                }
            }
            // Store the response into the future
            extendedFuture.set(extendedResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case INTERMEDIATE_RESPONSE:
            IntermediateResponse intermediateResponse;
            if (responseFuture instanceof SearchFuture) {
                intermediateResponse = new IntermediateResponseImpl(messageId);
                addControls(intermediateResponse, response);
                ((SearchFuture) responseFuture).set(intermediateResponse);
            } else if (responseFuture instanceof ExtendedFuture) {
                intermediateResponse = new IntermediateResponseImpl(messageId);
                addControls(intermediateResponse, response);
                ((ExtendedFuture) responseFuture).set(intermediateResponse);
            } else {
                // currently we only support IR for search and extended operations
                throw new UnsupportedOperationException("Unknown ResponseFuture type " + responseFuture.getClass().getName());
            }
            intermediateResponse.setResponseName(((IntermediateResponse) response).getResponseName());
            intermediateResponse.setResponseValue(((IntermediateResponse) response).getResponseValue());
            break;
        case MODIFY_RESPONSE:
            // Transform the response
            ModifyResponse modifyResponse = (ModifyResponse) response;
            ModifyFuture modifyFuture = (ModifyFuture) responseFuture;
            if (LOG.isDebugEnabled()) {
                if (modifyResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    if (LOG.isDebugEnabled()) {
                        LOG.debug(I18n.msg(I18n.MSG_03224_MODIFY_SUCCESSFUL, modifyResponse));
                    }
                } else {
                    // We have had an error
                    if (LOG.isDebugEnabled()) {
                        LOG.debug(I18n.msg(I18n.MSG_03223_MODIFY_FAILED, modifyResponse));
                    }
                }
            }
            // Store the response into the future
            modifyFuture.set(modifyResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case MODIFYDN_RESPONSE:
            // Transform the response
            ModifyDnResponse modifyDnResponse = (ModifyDnResponse) response;
            ModifyDnFuture modifyDnFuture = (ModifyDnFuture) responseFuture;
            if (LOG.isDebugEnabled()) {
                if (modifyDnResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    LOG.debug(I18n.msg(I18n.MSG_03226_MODIFYDN_SUCCESSFUL, modifyDnResponse));
                } else {
                    // We have had an error
                    LOG.debug(I18n.msg(I18n.MSG_03225_MODIFYDN_FAILED, modifyDnResponse));
                }
            }
            // Store the response into the future
            modifyDnFuture.set(modifyDnResponse);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case SEARCH_RESULT_DONE:
            // Store the response into the responseQueue
            SearchResultDone searchResultDone = (SearchResultDone) response;
            SearchFuture searchFuture = (SearchFuture) responseFuture;
            if (LOG.isDebugEnabled()) {
                if (searchResultDone.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS) {
                    // Everything is fine, return the response
                    LOG.debug(I18n.msg(I18n.MSG_03232_SEARCH_SUCCESSFUL, searchResultDone));
                } else {
                    // We have had an error
                    LOG.debug(I18n.msg(I18n.MSG_03230_SEARCH_FAILED, searchResultDone));
                }
            }
            // Store the response into the future
            searchFuture.set(searchResultDone);
            // Remove the future from the map
            removeFromFutureMaps(messageId);
            break;
        case SEARCH_RESULT_ENTRY:
            // Store the response into the responseQueue
            SearchResultEntry searchResultEntry = (SearchResultEntry) response;
            if (schemaManager != null) {
                searchResultEntry.setEntry(new DefaultEntry(schemaManager, searchResultEntry.getEntry()));
            }
            searchFuture = (SearchFuture) responseFuture;
            if (LOG.isDebugEnabled()) {
                LOG.debug(I18n.msg(I18n.MSG_03229_SEARCH_ENTRY_FOUND, searchResultEntry));
            }
            // Store the response into the future
            searchFuture.set(searchResultEntry);
            break;
        case SEARCH_RESULT_REFERENCE:
            // Store the response into the responseQueue
            SearchResultReference searchResultReference = (SearchResultReference) response;
            searchFuture = (SearchFuture) responseFuture;
            if (LOG.isDebugEnabled()) {
                LOG.debug(I18n.msg(I18n.MSG_03231_SEARCH_REFERENCE_FOUND, searchResultReference));
            }
            // Store the response into the future
            searchFuture.set(searchResultReference);
            break;
        default:
            throw new IllegalStateException("Unexpected response type " + response.getType());
    }
}
Also used : ModifyFuture(org.apache.directory.ldap.client.api.future.ModifyFuture) HandshakeFuture(org.apache.directory.ldap.client.api.future.HandshakeFuture) Message(org.apache.directory.api.ldap.model.message.Message) DefaultEntry(org.apache.directory.api.ldap.model.entry.DefaultEntry) SearchResultReference(org.apache.directory.api.ldap.model.message.SearchResultReference) IntermediateResponseImpl(org.apache.directory.api.ldap.model.message.IntermediateResponseImpl) BindResponse(org.apache.directory.api.ldap.model.message.BindResponse) BindFuture(org.apache.directory.ldap.client.api.future.BindFuture) ModifyDnFuture(org.apache.directory.ldap.client.api.future.ModifyDnFuture) IntermediateResponse(org.apache.directory.api.ldap.model.message.IntermediateResponse) ModifyDnResponse(org.apache.directory.api.ldap.model.message.ModifyDnResponse) CompareFuture(org.apache.directory.ldap.client.api.future.CompareFuture) ModifyResponse(org.apache.directory.api.ldap.model.message.ModifyResponse) CompareResponse(org.apache.directory.api.ldap.model.message.CompareResponse) SearchResultDone(org.apache.directory.api.ldap.model.message.SearchResultDone) ExtendedFuture(org.apache.directory.ldap.client.api.future.ExtendedFuture) AddResponse(org.apache.directory.api.ldap.model.message.AddResponse) DeleteFuture(org.apache.directory.ldap.client.api.future.DeleteFuture) DeleteResponse(org.apache.directory.api.ldap.model.message.DeleteResponse) ExtendedResponse(org.apache.directory.api.ldap.model.message.ExtendedResponse) AddFuture(org.apache.directory.ldap.client.api.future.AddFuture) SearchFuture(org.apache.directory.ldap.client.api.future.SearchFuture) SearchResultEntry(org.apache.directory.api.ldap.model.message.SearchResultEntry)

Example 15 with Message

use of org.apache.directory.api.ldap.model.message.Message in project directory-ldap-api by apache.

the class LdapNetworkConnection method loadSchema.

/**
 * loads schema using the specified schema loader
 *
 * @param loader the {@link SchemaLoader} to be used to load schema
 * @throws LdapException If the schema loading failed
 */
public void loadSchema(SchemaLoader loader) throws LdapException {
    try {
        SchemaManager tmp = new DefaultSchemaManager(loader);
        tmp.loadAllEnabled();
        if (!tmp.getErrors().isEmpty() && loader.isStrict()) {
            String msg = I18n.err(I18n.ERR_03204_ERROR_LOADING_SCHEMA);
            if (LOG.isErrorEnabled()) {
                LOG.error("{} {}", msg, Strings.listToString(tmp.getErrors()));
            }
            throw new LdapException(msg);
        }
        schemaManager = tmp;
        // Change the container's BinaryDetector
        ldapSession.setAttribute(LdapDecoder.MESSAGE_CONTAINER_ATTR, new LdapMessageContainer<MessageDecorator<? extends Message>>(codec, new SchemaBinaryAttributeDetector(schemaManager)));
    } catch (LdapException le) {
        throw le;
    } catch (Exception e) {
        LOG.error(I18n.err(I18n.ERR_03205_FAIL_LOAD_SCHEMA), e);
        throw new LdapException(e);
    }
}
Also used : MessageDecorator(org.apache.directory.api.ldap.codec.api.MessageDecorator) Message(org.apache.directory.api.ldap.model.message.Message) DefaultSchemaManager(org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager) SchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager) LdapException(org.apache.directory.api.ldap.model.exception.LdapException) SchemaBinaryAttributeDetector(org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector) UnresolvedAddressException(java.nio.channels.UnresolvedAddressException) ConnectException(java.net.ConnectException) IOException(java.io.IOException) LdapInvalidDnException(org.apache.directory.api.ldap.model.exception.LdapInvalidDnException) InvalidConnectionException(org.apache.directory.ldap.client.api.exception.InvalidConnectionException) LdapOperationException(org.apache.directory.api.ldap.model.exception.LdapOperationException) LdapAuthenticationException(org.apache.directory.api.ldap.model.exception.LdapAuthenticationException) MessageEncoderException(org.apache.directory.api.ldap.codec.api.MessageEncoderException) CursorException(org.apache.directory.api.ldap.model.cursor.CursorException) DecoderException(org.apache.directory.api.asn1.DecoderException) LdapNoPermissionException(org.apache.directory.api.ldap.model.exception.LdapNoPermissionException) LdapOtherException(org.apache.directory.api.ldap.model.exception.LdapOtherException) ProtocolEncoderException(org.apache.mina.filter.codec.ProtocolEncoderException) LdapException(org.apache.directory.api.ldap.model.exception.LdapException) DefaultSchemaManager(org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager)

Aggregations

Message (org.apache.directory.api.ldap.model.message.Message)30 DecoderException (org.apache.directory.api.asn1.DecoderException)26 LdapMessageContainer (org.apache.directory.api.ldap.codec.api.LdapMessageContainer)24 ByteBuffer (java.nio.ByteBuffer)22 AbstractCodecServiceTest (org.apache.directory.api.ldap.codec.osgi.AbstractCodecServiceTest)21 Test (org.junit.Test)21 Asn1Decoder (org.apache.directory.api.asn1.ber.Asn1Decoder)20 ResponseCarryingException (org.apache.directory.api.ldap.codec.api.ResponseCarryingException)16 MessageDecorator (org.apache.directory.api.ldap.codec.api.MessageDecorator)11 Asn1Container (org.apache.directory.api.asn1.ber.Asn1Container)3 TLV (org.apache.directory.api.asn1.ber.tlv.TLV)3 ModifyDnRequestDecorator (org.apache.directory.api.ldap.codec.decorators.ModifyDnRequestDecorator)3 AddResponseImpl (org.apache.directory.api.ldap.model.message.AddResponseImpl)3 ModifyDnResponseImpl (org.apache.directory.api.ldap.model.message.ModifyDnResponseImpl)3 IOException (java.io.IOException)2 ConnectException (java.net.ConnectException)2 UnresolvedAddressException (java.nio.channels.UnresolvedAddressException)2 ArrayList (java.util.ArrayList)2 SchemaBinaryAttributeDetector (org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector)2 CompareRequestDecorator (org.apache.directory.api.ldap.codec.decorators.CompareRequestDecorator)2