Class EmbeddedLdapServer
java.lang.Object
org.springframework.ldap.test.unboundid.EmbeddedLdapServer
- All Implemented Interfaces:
AutoCloseable
Helper class for embedded Unboundid ldap server.
- Since:
- 2.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHelper class for embedded Unboundid ldap server. -
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedLdapServer(com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer) Construct anEmbeddedLdapServerusing the providedInMemoryDirectoryServer. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the embedded LDAP server and releases resource, closing existing connections.static EmbeddedLdapServernewEmbeddedServer(String defaultPartitionName, String defaultPartitionSuffix, int port) Deprecated.voidshutdown()Deprecated.Useclose()instead.voidstart()Starts the embedded LDAP server.static EmbeddedLdapServer.BuilderwithPartitionSuffix(String partitionSuffix) Creates a newEmbeddedLdapServer.Builderwith a given partition suffix.
-
Constructor Details
-
EmbeddedLdapServer
public EmbeddedLdapServer(com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer) Construct anEmbeddedLdapServerusing the providedInMemoryDirectoryServer.- Since:
- 3.3
-
-
Method Details
-
withPartitionSuffix
Creates a newEmbeddedLdapServer.Builderwith a given partition suffix.- Since:
- 3.3
-
newEmbeddedServer
@Deprecated(since="3.3") public static EmbeddedLdapServer newEmbeddedServer(String defaultPartitionName, String defaultPartitionSuffix, int port) throws Exception Deprecated.Use the builder pattern exposed viawithPartitionSuffix(String)instead.Creates and starts new embedded LDAP server.- Throws:
Exception
-
start
public void start()Starts the embedded LDAP server.- Since:
- 3.3
-
close
public void close()Closes the embedded LDAP server and releases resource, closing existing connections.- Specified by:
closein interfaceAutoCloseable- Since:
- 3.3
-
shutdown
Deprecated.Useclose()instead.
-
withPartitionSuffix(String)instead.