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 class
Helper class for embedded Unboundid ldap server. -
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedLdapServer
(com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer) Construct anEmbeddedLdapServer
using the providedInMemoryDirectoryServer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the embedded LDAP server and releases resource, closing existing connections.static EmbeddedLdapServer
newEmbeddedServer
(String defaultPartitionName, String defaultPartitionSuffix, int port) Deprecated.void
shutdown()
Deprecated.Useclose()
instead.void
start()
Starts the embedded LDAP server.static EmbeddedLdapServer.Builder
withPartitionSuffix
(String partitionSuffix) Creates a newEmbeddedLdapServer.Builder
with a given partition suffix.
-
Constructor Details
-
EmbeddedLdapServer
public EmbeddedLdapServer(com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer) Construct anEmbeddedLdapServer
using the providedInMemoryDirectoryServer
.- Since:
- 3.3
-
-
Method Details
-
withPartitionSuffix
Creates a newEmbeddedLdapServer.Builder
with 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:
close
in interfaceAutoCloseable
- Since:
- 3.3
-
shutdown
Deprecated.Useclose()
instead.
-
withPartitionSuffix(String)
instead.