Package org.apache.directory.server.ldap

Examples of org.apache.directory.server.ldap.LdapServer


     * @return a running LdapServer instance
     */
    public static LdapServer createLdapServer( CreateLdapServer createLdapServer, DirectoryService directoryService, int startPort )
    {
       
        LdapServer ldapServer = instantiateLdapServer( createLdapServer, directoryService, startPort );
       
        if ( ldapServer == null )
        {
            return null;
        }
       
        // Launch the server
        try
        {
            ldapServer.start();
        }
        catch ( Exception e )
        {
            e.printStackTrace();
        }
View Full Code Here


            int consumerPort = AvailablePortFinder.getNextAvailable( 1024 );

            initSchema( dirService );
            initSystemPartition( dirService );

            ldapServer = new LdapServer();
            ldapServer.setTransports( new TcpTransport( consumerPort ) );
            ldapServer.setDirectoryService( dirService );
           
            DN suffix = new DN( config.getBaseDn() );
            JdbmPartition partition = new JdbmPartition();
View Full Code Here

     *
     * @throws Exception
     */
    public void startServer() throws Exception
    {
        server = new LdapServer();
        server.setBindHandler(new BindHandler());
       
        server.setTransports( new TcpTransport( LDAP_PORT ) );
        server.setDirectoryService( service );
       
View Full Code Here

        return partition;
    }

    public void configureLdapServer(final int port) throws Exception
    {
        ldapService = new LdapServer();
        ldapService.setTransports(new TcpTransport(port));
        ldapService.setDirectoryService(service);

        apacheDs = new ApacheDS(ldapService);
    }
View Full Code Here

        partition.setId( "foo" );
        partition.setSuffix( baseDN );
        service.addPartition( partition );
       
        service.setWorkingDirectory(workingDir);
        server = new LdapServer();
        server.setDirectoryService(service);
        server.setTransports(new  TcpTransport(port));
        service.startup();
        server.start();
       
View Full Code Here

TOP

Related Classes of org.apache.directory.server.ldap.LdapServer

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.