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

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


    /**
     * {@inheritDoc}
     */
    public ExtendedResponse extended( OID oid, byte[] value ) throws LdapException
    {
        ExtendedRequest extendedRequest = new ExtendedRequestImpl();
        extendedRequest.setRequestName( oid.toString() );
        extendedRequest.setRequestValue( value );

        return extended( extendedRequest );
    }
View Full Code Here


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

        // Check the decoded ExtendedRequest PDU
        ExtendedRequest extendedRequest = container
            .getMessage();

        assertEquals( 1, extendedRequest.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
        assertEquals( "value", Strings.utf8ToString(extendedRequest.getRequestValue()) );

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

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

        // Check the decoded ExtendedRequest PDU
        ExtendedRequest extendedRequest = container.getMessage();

        assertEquals( 1, extendedRequest.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
        assertEquals( "value", Strings.utf8ToString(extendedRequest.getRequestValue()) );

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

        assertEquals( 1, controls.size() );
        assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );

        @SuppressWarnings("unchecked")
        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
        assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );

        // Check the encoding
        try
        {
View Full Code Here

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

        // Check the decoded ExtendedRequest PDU
        ExtendedRequest extendedRequest = container.getMessage();

        assertEquals( 1, extendedRequest.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
        assertEquals( "", Strings.utf8ToString(extendedRequest.getRequestValue()) );

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

        assertEquals( 1, controls.size() );

        assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );

        @SuppressWarnings("unchecked")
        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
        assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );

        // Check the encoding
        try
        {
View Full Code Here

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

        // Check the decoded ExtendedRequest PDU
        ExtendedRequest extendedRequest = container.getMessage();

        assertEquals( 1, extendedRequest.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );

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

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

        // Check the decoded ExtendedRequest PDU
        ExtendedRequest extendedRequest = container.getMessage();

        assertEquals( 1, extendedRequest.getMessageId() );
        assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
        assertEquals( "", Strings.utf8ToString(extendedRequest.getRequestValue()) );

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

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

        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();

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

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

        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
        Map<String, Control> controls = extendedRequest.getControls();

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

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

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

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

        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
        Map<String, Control> controls = extendedRequest.getControls();

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

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

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

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

        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
        Map<String, Control> controls = extendedRequest.getControls();

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

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

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

TOP

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

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.