Package org.apache.directory.ldap.client.api

Examples of org.apache.directory.ldap.client.api.LdapNetworkConnection.search()


                if ( j == 50000 )
                {
                    t00 = System.currentTimeMillis();
                }

                cursor = connection.search( "ou=system", "(ObjectClass=*)", SearchScope.SUBTREE, "*" );

                while ( cursor.next() )
                {
                    count++;
                    cursor.get();
View Full Code Here


            // Use the client API as JNDI cannot be used to do a search without
            // first binding. (hmmm, even client API won't allow searching without binding)
            connection.bind( "uid=admin,ou=system", "secret" );

            // Searches for all the entries in ou=system
            EntryCursor cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)",
                SearchScope.OBJECT, "*" );

            int i = 0;

            while ( cursor.next() )
View Full Code Here

            cursor.close();
            assertEquals( 1, i );

            for ( int j = 0; j < 10000; j++ )
            {
                cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)", SearchScope.OBJECT, "*" );
               
                while ( cursor.next() )
                {
                }
               
View Full Code Here

                if ( j % 10000 == 0 )
                {
                    System.out.println( j );
                }

                cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)", SearchScope.OBJECT, "*" );
                while ( cursor.next() )
                {
                }
                cursor.close();
            }
View Full Code Here

        LdapConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
        connection.bind( "uid=admin,ou=system", "secret" );

        long t2 = System.currentTimeMillis();

        EntryCursor cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE, "*" );
       
        while ( cursor.next() )
        {
            cursor.get();
        }
View Full Code Here

                asyncCnx.add( kate );
            }

            // Searches for all the entries in ou=system
            EntryCursor cursor = asyncCnx.search( "ou=system", "(ObjectClass=*)", SearchScope.SUBTREE, "*" );

            // Now loop on all the elements found, and abandon after 10 elements returned
            int count = 0;

            while ( cursor.next() )
View Full Code Here

   
                asyncCnx.add( kate );
            }
   
            // Searches for all the entries in ou=system
            cursor = asyncCnx.search( "ou=system", "(ObjectClass=*)", SearchScope.SUBTREE, "*" );
   
            // Now loop on all the elements found, and abandon after 10 elements returned
            int count = 0;
   
            while ( cursor.next() )
View Full Code Here

                searchRequest.setFilter( "(ObjectClass=*)" );
                searchRequest.setScope( SearchScope.SUBTREE );
                searchRequest.addAttributes( "*" );
                searchRequest.addControl( pagedSearchControl );
   
                cursor = new EntryCursorImpl( connection.search( searchRequest ) );
   
                int i = 0;
   
                while ( cursor.next() )
                {
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.