Examples of AddResponse


Examples of org.apache.directory.shared.ldap.model.message.AddResponse

            de.printStackTrace();
            fail( de.getMessage() );
        }

        // Check the decoded AddResponse
        AddResponse addResponse = container.getMessage();

        assertEquals( 1, addResponse.getMessageId() );
        assertEquals( ResultCodeEnum.REFERRAL, addResponse.getLdapResult().getResultCode() );
        assertEquals( "", addResponse.getLdapResult().getMatchedDn().getName() );
        assertEquals( "", addResponse.getLdapResult().getErrorMessage() );

        Referral referral = addResponse.getLdapResult().getReferral();

        assertNotNull( referral );

        assertEquals( 2, referral.getLdapUrls().size() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        // Get the result from the future
        try
        {
            // Read the response, waiting for it if not available immediately
            // Get the response, blocking
            AddResponse addResponse = addFuture.get( timeout, TimeUnit.MILLISECONDS );

            if ( addResponse == null )
            {
                // We didn't received anything : this is an error
                LOG.error( "Add failed : timeout occured" );
                throw new LdapException( TIME_OUT_ERROR );
            }

            if ( addResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
            {
                // Everything is fine, return the response
                LOG.debug( "Add successful : {}", addResponse );
            }
            else
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        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( "Add successful : {}", addResponse );
                    }
                    else
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

            de.printStackTrace();
            fail( de.getMessage() );
        }

        // Check the decoded AddResponse
        AddResponse addResponse = container.getMessage();

        assertEquals( 1, addResponse.getMessageId() );
        assertEquals( ResultCodeEnum.SUCCESS, addResponse.getLdapResult().getResultCode() );
        assertEquals( "", addResponse.getLdapResult().getMatchedDn().getName() );
        assertEquals( "", addResponse.getLdapResult().getErrorMessage() );

        try
        {
            ByteBuffer bb = encoder.encodeMessage( addResponse );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

            de.printStackTrace();
            fail( de.getMessage() );
        }

        // Check the decoded AddResponse
        AddResponse addResponse = container.getMessage();

        assertEquals( 1, addResponse.getMessageId() );
        assertEquals( ResultCodeEnum.SUCCESS, addResponse.getLdapResult().getResultCode() );
        assertEquals( "", addResponse.getLdapResult().getMatchedDn().getName() );
        assertEquals( "", addResponse.getLdapResult().getErrorMessage() );

        // Check the Control
        Map<String, Control> controls = addResponse.getControls();

        assertEquals( 1, controls.size() );

        @SuppressWarnings("unchecked")
        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AddResponse addResponse = ( AddResponse ) parser.getBatchResponse().getCurrentResponse();

        assertEquals( 456, addResponse.getMessageId() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AddResponse addResponse = ( AddResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = addResponse.getControls();

        assertEquals( 1, addResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.643" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AddResponse addResponse = ( AddResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = addResponse.getControls();

        assertEquals( 1, addResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.643" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AddResponse addResponse = ( AddResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = addResponse.getControls();

        assertEquals( 2, addResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.789" );

        assertNotNull( control );
        assertFalse( control.isCritical() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.AddResponse

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AddResponse addResponse = ( AddResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = addResponse.getControls();

        assertEquals( 3, addResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.456" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.