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 SummaryNested ClassesModifier and TypeClassDescriptionstatic final classHelper class for embedded Unboundid ldap server.
- 
Constructor SummaryConstructorsConstructorDescriptionEmbeddedLdapServer(com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer) Construct anEmbeddedLdapServerusing the providedInMemoryDirectoryServer.
- 
Method SummaryModifier 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- 
EmbeddedLdapServerpublic EmbeddedLdapServer(com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer) Construct anEmbeddedLdapServerusing the providedInMemoryDirectoryServer.- Since:
- 3.3
 
 
- 
- 
Method Details- 
withPartitionSuffixCreates 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
 
- 
startpublic void start()Starts the embedded LDAP server.- Since:
- 3.3
 
- 
closepublic void close()Closes the embedded LDAP server and releases resource, closing existing connections.- Specified by:
- closein interface- AutoCloseable
- Since:
- 3.3
 
- 
shutdownDeprecated.Useclose()instead.
 
- 
withPartitionSuffix(String)instead.