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

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


  }

  public static int setupLdap() throws Exception {
    URL usersUrl = getResourceUrl( "users.ldif" );
    int port = findFreePort();
    ldapTransport = new TcpTransport( port );
    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", new File( usersUrl.toURI() ), ldapTransport );
    ldap.start();
    LOG.info( "LDAP port = " + ldapTransport.getPort() );
    return port;
  }
View Full Code Here


  }

  public static int setupLdap() throws Exception {
    URL usersUrl = getResourceUrl( "users.ldif" );
    int port = findFreePort();
    ldapTransport = new TcpTransport( port );
    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", new File( usersUrl.toURI() ), ldapTransport );
    ldap.start();
    LOG.info( "LDAP port = " + ldapTransport.getPort() );
    return port;
  }
View Full Code Here

  }

  public static void setupLdap() throws Exception {
    URL usersUrl = getResourceUrl( "users.ldif" );
    int port = findFreePort();
    ldapTransport = new TcpTransport( port );
    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", new File( usersUrl.toURI() ), ldapTransport );
    ldap.start();
    LOG.info( "LDAP port = " + ldapTransport.getPort() );
  }
View Full Code Here

  }

  public static void setupLdap() throws Exception {
    URL usersUrl = getResourceUrl( "users.ldif" );
    int port = findFreePort();
    ldapTransport = new TcpTransport( port );
    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", new File( usersUrl.toURI() ), ldapTransport );
    ldap.start();
    LOG.info( "LDAP port = " + ldapTransport.getPort() );
  }
View Full Code Here

  @BeforeClass
  public static void setup() throws Exception {
    port = findFreePort();
    ldifFile = new File( ClassLoader.getSystemResource( "users.ldif" ).toURI() );
    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", ldifFile, new Transport[]{ new TcpTransport( port ) } );
    ldap.start();
  }
View Full Code Here

    // Make sure the port is free.
    ServerSocket socket = new ServerSocket( port );
    socket.close();

    TcpTransport transport = new TcpTransport( port );
    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", file, transport );
    ldap.start();
  }
View Full Code Here

  private Server jetty;

  @BeforeClass
  public static void setupSuite() throws Exception{
    int port = findFreePort();
    TcpTransport transport = new TcpTransport( port );
    ldap = new SimpleLdapDirectoryServer(
        "dc=hadoop,dc=apache,dc=org",
        new File( ClassLoader.getSystemResource( "users.ldif" ).toURI() ),
        transport );
    ldap.start();
View Full Code Here

            LOG.info( "server: using default settings ..." ); //$NON-NLS-1$
            DirectoryService directoryService = new DefaultDirectoryService();
            directoryService.startup();
            ldapServer = new LdapServer();
            ldapServer.setDirectoryService( directoryService );
            TcpTransport tcpTransportSsl = new TcpTransport( 10636 );
            tcpTransportSsl.enableSSL( true );
            ldapServer.setTransports( new TcpTransport( 10389 ), tcpTransportSsl );
            apacheDS = new ApacheDS( ldapServer );
        }

        if ( install != null )
        {
View Full Code Here

  private static LdapServer createTransport( DirectoryService directory, int ldapPort ) {
    LdapServer transport = new LdapServer();
    transport.setDirectoryService( directory );
    if( ldapPort <= 0 ) {
      transport.setTransports( new TcpTransport() );
    } else {
      transport.setTransports( new TcpTransport( ldapPort ) );
    }
    return transport;
  }
View Full Code Here

      addLdaps(keystorePath, keystorePasswd);
   }
  
  
   public void addLdaps(final String keystorePath, final String keystorePasswd) throws Exception {
      Transport ldaps = new TcpTransport(LDAPS_PORT);
      ldaps.enableSSL(true);
      ldapServer.addTransports(ldaps);
      ldapServer.setKeystoreFile(keystorePath);
      ldapServer.setCertificatePassword(keystorePasswd);
   }
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.