Package org.apache.directory.server.protocol.shared.transport

Examples of org.apache.directory.server.protocol.shared.transport.TcpTransport


            service.setShutdownHookEnabled(false);
            service.getChangeLog().setEnabled(false);
            service.startup();

            server = new LdapServer();
            server.setTransports(new TcpTransport("localhost", serverPort));
            server.setDirectoryService(service);
            server.start();

            createRoot(partition);
            if (ldifFile != null) {
View Full Code Here


    }

    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

          service.getAdminSession().add( entryExo );
      }

      port = AvailablePortFinder.getNextAvailable(1024);
      server = new LdapServer();
      server.setTransports( new TcpTransport(port));
      server.setDirectoryService(service);
      server.start();

      // server launched and configured
View Full Code Here

                    getRoot()));
            partition.initialize();
            service.addPartition(partition);

            server = new LdapServer();
            server.setTransports(new TcpTransport("localhost", getServerPort()));
            server.setDirectoryService(service);

            service.startup();
            server.start();
View Full Code Here

        processLdif(schemaManager, adminSession, "user.ldif", mappings);
        processLdif(schemaManager, adminSession, "server.ldif", mappings);

        ldapServer = new LdapServer();
        ldapServer.setServiceName("DefaultLDAP");
        Transport ldap = new TcpTransport( "0.0.0.0", LDAP_PORT, 3, 5 );
        ldapServer.addTransports(ldap);
        ldapServer.setDirectoryService(directoryService);
        ldapServer.start();
    }
View Full Code Here

        try {
            initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent);

            server = new LdapServer();
            server.setTransports(
                    new TcpTransport(Integer.valueOf(sce.getServletContext().getInitParameter("testds.port"))));
            server.setDirectoryService(service);

            server.start();

            // store directoryService in context to provide it to servlets etc.
View Full Code Here

        // service LDAP :
        server = new LdapServer();
        // int serverPort = 10389;
        int serverPort = 389;
        server.setTransports(new TcpTransport(serverPort));
        server.setDirectoryService(service);

        server.start();
    }
View Full Code Here

                    }
                }
               
                if ( protocol.equalsIgnoreCase( "LDAP" ) )
                {
                    Transport ldap = new TcpTransport( address, port, nbThreads, backlog );
                    ldapServer.addTransports( ldap );
                }
                else if ( protocol.equalsIgnoreCase( "LDAPS" ) )
                {
                    Transport ldaps = new TcpTransport( address, port, nbThreads, backlog );
                    ldaps.setEnableSSL( true );
                    ldapServer.addTransports( ldaps );
                }
                else
                {
                    throw new IllegalArgumentException( I18n.err( I18n.ERR_689, protocol ) );
                }
            }
        }
        else
        {
            // Create default LDAP and LDAPS transports
            int port = AvailablePortFinder.getNextAvailable( 1024 );
            Transport ldap = new TcpTransport( port );
            ldapServer.addTransports( ldap );
           
            port = AvailablePortFinder.getNextAvailable( port );
            Transport ldaps = new TcpTransport( port );
            ldaps.setEnableSSL( true );
            ldapServer.addTransports( ldaps );
        }
    }
View Full Code Here

                    startPort = port + 1;
                }
               
                if ( protocol.equalsIgnoreCase( "TCP" ) )
                {
                    Transport tcp = new TcpTransport( address, port, nbThreads, backlog );
                    kdcServer.addTransports( tcp );
                }
                else if ( protocol.equalsIgnoreCase( "UDP" ) )
                {
                    UdpTransport udp = new UdpTransport( address, port );
View Full Code Here

            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();
            partition.setSuffix( suffix.getName() );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.protocol.shared.transport.TcpTransport

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.