org.apache.directory.server.factory
Class ServerAnnotationProcessor

java.lang.Object
  extended by org.apache.directory.server.factory.ServerAnnotationProcessor

public class ServerAnnotationProcessor
extends Object

Annotation processor for creating LDAP and Kerberos servers.

Author:
Apache Directory Project

Constructor Summary
ServerAnnotationProcessor()
           
 
Method Summary
static LdapServer createLdapServer(CreateLdapServer createLdapServer, DirectoryService directoryService, int startPort)
          creates an LdapServer and starts before returning the instance
static LdapServer createLdapServer(org.junit.runner.Description description, DirectoryService directoryService, int startPort)
          Create a new instance of LdapServer
static LdapServer createLdapServer(DirectoryService directoryService, int startPort)
          Create a new instance of LdapServer
static KdcServer getKdcServer(org.junit.runner.Description description, DirectoryService directoryService, int startPort)
           
static KdcServer getKdcServer(DirectoryService directoryService, int startPort)
           
static LdapServer instantiateLdapServer(CreateLdapServer createLdapServer, DirectoryService directoryService, int startPort)
          Just gives an instance of LdapServer without starting it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerAnnotationProcessor

public ServerAnnotationProcessor()
Method Detail

instantiateLdapServer

public static LdapServer instantiateLdapServer(CreateLdapServer createLdapServer,
                                               DirectoryService directoryService,
                                               int startPort)
Just gives an instance of LdapServer without starting it. For getting a running LdapServer instance see createLdapServer(CreateLdapServer, DirectoryService, int)

See Also:
createLdapServer(CreateLdapServer, DirectoryService, int)

createLdapServer

public static LdapServer createLdapServer(CreateLdapServer createLdapServer,
                                          DirectoryService directoryService,
                                          int startPort)
creates an LdapServer and starts before returning the instance

Parameters:
createLdapServer - the annotation containing the custom configuration
directoryService - the directory service
startPort - a port number to start with in order to find any available port for use (if the given port number is already in use)
this option will only be used if the port specified in CreateTransport annotation is -1.
Returns:
a running LdapServer instance

createLdapServer

public static LdapServer createLdapServer(DirectoryService directoryService,
                                          int startPort)
                                   throws Exception
Create a new instance of LdapServer

Parameters:
directoryService - The associated DirectoryService
startPort - The port used by the server
Returns:
An LdapServer instance
Throws:
Exception - If the server cannot be started

createLdapServer

public static LdapServer createLdapServer(org.junit.runner.Description description,
                                          DirectoryService directoryService,
                                          int startPort)
                                   throws Exception
Create a new instance of LdapServer

Parameters:
description - A description for the created LdapServer
directoryService - The associated DirectoryService
startPort - The port used by the server
Returns:
An LdapServer instance
Throws:
Exception - If the server cannot be started

getKdcServer

public static KdcServer getKdcServer(DirectoryService directoryService,
                                     int startPort)
                              throws Exception
Throws:
Exception

getKdcServer

public static KdcServer getKdcServer(org.junit.runner.Description description,
                                     DirectoryService directoryService,
                                     int startPort)
                              throws Exception
Throws:
Exception


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.