Examples of UnbindRequest


Examples of org.apache.directory.api.ldap.model.message.UnbindRequest

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

        UnbindRequest unbindRequest = ldapMessageContainer.getMessage();

        assertEquals( 1, unbindRequest.getMessageId() );

        // Check the encoding
        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );

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

Examples of org.apache.directory.api.ldap.model.message.UnbindRequest

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

        UnbindRequest unbindRequest = ldapMessageContainer.getMessage();

        assertEquals( 1, unbindRequest.getMessageId() );

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

        assertEquals( 1, controls.size() );

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

        // Check the encoding
        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );
        internalUnbindRequest.addControl( control );

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

Examples of org.apache.directory.api.ldap.model.message.UnbindRequest

        // Creates the messageID and stores it into the
        // initial message and the transmitted message.
        int newId = messageId.incrementAndGet();

        // Create the UnbindRequest
        UnbindRequest unbindRequest = new UnbindRequestImpl();
        unbindRequest.setMessageId( newId );

        LOG.debug( "Sending Unbind request \n{}", unbindRequest );

        // Send the request to the server
        // Use this for logging instead: WriteFuture unbindFuture = ldapSession.write( unbindRequest );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.UnbindRequest

        // Creates the messageID and stores it into the
        // initial message and the transmitted message.
        int newId = messageId.incrementAndGet();

        // Create the UnbindRequest
        UnbindRequest unbindRequest = new UnbindRequestImpl();
        unbindRequest.setMessageId( newId );

        LOG.debug( "-----------------------------------------------------------------" );
        LOG.debug( "Sending Unbind request \n{}", unbindRequest );

        // Send the request to the server
View Full Code Here

Examples of org.apache.directory.shared.ldap.message.UnbindRequest

     * @throws DecoderException
     * @throws IOException
     */
    private void unbind( int messageId ) throws EncoderException, DecoderException, IOException
    {
        UnbindRequest unbindRequest = new UnbindRequestImpl( messageId );
        LdapEncoder encoder = new LdapEncoder();

        ByteBuffer bb = encoder.encodeMessage( unbindRequest );
        bb.flip();

View Full Code Here

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

        // Creates the messageID and stores it into the
        // initial message and the transmitted message.
        int newId = messageId.incrementAndGet();

        // Create the UnbindRequest
        UnbindRequest unbindRequest = new UnbindRequestImpl();
        unbindRequest.setMessageId( newId );

        LOG.debug( "-----------------------------------------------------------------" );
        LOG.debug( "Sending Unbind request \n{}", unbindRequest );

        // Send the request to the server
View Full Code Here

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

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

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

        // Creates the messageID and stores it into the
        // initial message and the transmitted message.
        int newId = messageId.incrementAndGet();

        // Create the UnbindRequest
        UnbindRequest unbindRequest = new UnbindRequestImpl();
        unbindRequest.setMessageId( newId );

        LOG.debug( "-----------------------------------------------------------------" );
        LOG.debug( "Sending Unbind request \n{}", unbindRequest );

        // Send the request to the server
View Full Code Here

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

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

        UnbindRequest unbindRequest = ldapMessageContainer.getMessage();

        assertEquals( 1, unbindRequest.getMessageId() );

        // Check the encoding
        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );

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

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

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

        UnbindRequest unbindRequest = ldapMessageContainer.getMessage();

        assertEquals( 1, unbindRequest.getMessageId() );

        // Check the Control
        Map<String, Control> controls = unbindRequest.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" );
        assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );

        // Check the encoding
        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );

        internalUnbindRequest.addControl( control );

        try
        {
            ByteBuffer bb = encoder.encodeMessage( internalUnbindRequest );
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.