Package org.apache.directory.shared.ldap.model.message

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


                removeFromFutureMaps( messageId );

                break;

            case INTERMEDIATE_RESPONSE:
                IntermediateResponse intermediateResponse = null;

                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
View Full Code Here


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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
        assertEquals( "value", Strings.utf8ToString(intermediateResponse.getResponseValue()) );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( intermediateResponse );
View Full Code Here

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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
        assertEquals( "value", Strings.utf8ToString(intermediateResponse.getResponseValue()) );

        // Check the Control
        Map<String, Control> controls = intermediateResponse.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

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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
        assertEquals( "", Strings.utf8ToString(intermediateResponse.getResponseValue()) );

        // Check the Control
        Map<String, Control> controls = intermediateResponse.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

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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( intermediateResponse );
View Full Code Here

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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
        assertEquals( "", Strings.utf8ToString(intermediateResponse.getResponseValue()) );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( intermediateResponse );
View Full Code Here

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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "", intermediateResponse.getResponseName() );
        assertEquals( "value", Strings.utf8ToString(intermediateResponse.getResponseValue()) );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( intermediateResponse );
View Full Code Here

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

        // Check the decoded IntermediateResponse PDU
        IntermediateResponse intermediateResponse = ldapMessageContainer.getMessage();

        assertEquals( 1, intermediateResponse.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
        assertEquals( "", Strings.utf8ToString(intermediateResponse.getResponseValue()) );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( intermediateResponse );
View Full Code Here

                removeFromFutureMaps( messageId );

                break;

            case INTERMEDIATE_RESPONSE:
                IntermediateResponse intermediateResponse = null;

                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
View Full Code Here

                removeFromFutureMaps( messageId );

                break;

            case INTERMEDIATE_RESPONSE:
                IntermediateResponse intermediateResponse = null;

                if ( responseFuture instanceof SearchFuture )
                {
                    intermediateResponse = new IntermediateResponseImpl( messageId );
                    addControls( intermediateResponse, ( IntermediateResponse ) response );
                    ( ( SearchFuture ) responseFuture ).set( intermediateResponse );
                }
                else if ( responseFuture instanceof ExtendedFuture )
                {
                    intermediateResponse = new IntermediateResponseImpl( messageId );
                    addControls( intermediateResponse, ( 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
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.message.IntermediateResponse

Copyright © 2018 www.massapicom. 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.