Class ApacheDSContainer
java.lang.Object
org.springframework.security.ldap.server.ApacheDSContainer
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware,- org.springframework.beans.factory.DisposableBean,- org.springframework.beans.factory.InitializingBean,- org.springframework.context.ApplicationContextAware,- org.springframework.context.Lifecycle,- EmbeddedLdapServerContainer
@Deprecated(since="5.2",
            forRemoval=true)
public class ApacheDSContainer
extends Object
implements EmbeddedLdapServerContainer, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.Lifecycle, org.springframework.context.ApplicationContextAware
Deprecated, for removal: This API element is subject to removal in a future version.
Provides lifecycle services for the embedded apacheDS server defined by the supplied
 configuration. Used by 
LdapServerBeanDefinitionParser. An instance will be
 stored in the application context for each embedded server instance. It will start the
 server when the context is initialized and shut it down when it is closed. It is
 intended for temporary embedded use and will not retain changes across start/stop
 boundaries. The working directory is deleted on shutdown.
 If used repeatedly in a single JVM process with the same configuration (for example, when repeatedly loading an application context during testing), it's important that the application context is closed to allow the bean to be disposed of and the server shutdown prior to attempting to start it again.
This class is intended for testing and internal security namespace use, only, and is not considered part of the framework's public API.
- 
Constructor SummaryConstructorsConstructorDescriptionApacheDSContainer(String root, String ldifs) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.voiddestroy()Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.Returns the port that is resolved byTcpTransport.intgetPort()Deprecated, for removal: This API element is subject to removal in a future version.Returns the embedded LDAP server port.org.apache.directory.server.core.DefaultDirectoryServiceDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Deprecated, for removal: This API element is subject to removal in a future version.voidsetCertificatePassord(String certificatePassord) Deprecated, for removal: This API element is subject to removal in a future version.Will set the certificate password on the underlyingLdapServer.voidsetKeyStoreFile(File keyStoreFile) Deprecated, for removal: This API element is subject to removal in a future version.The keyStore must not be null and must be a valid file.voidsetLdapOverSslEnabled(boolean ldapOverSslEnabled) Deprecated, for removal: This API element is subject to removal in a future version.If set totruewill enable LDAP over SSL (LDAPs).voidsetPort(int port) Deprecated, for removal: This API element is subject to removal in a future version.The embedded LDAP server port to connect to.voidsetWorkingDirectory(File workingDir) Deprecated, for removal: This API element is subject to removal in a future version.voidstart()Deprecated, for removal: This API element is subject to removal in a future version.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.
- 
Constructor Details- 
ApacheDSContainerDeprecated, for removal: This API element is subject to removal in a future version.- Throws:
- Exception
 
 
- 
- 
Method Details- 
afterPropertiesSetDeprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
- Throws:
- Exception
 
- 
destroypublic void destroy()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- destroyin interface- org.springframework.beans.factory.DisposableBean
 
- 
setApplicationContextpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- setApplicationContextin interface- org.springframework.context.ApplicationContextAware
- Throws:
- org.springframework.beans.BeansException
 
- 
setWorkingDirectoryDeprecated, for removal: This API element is subject to removal in a future version.
- 
setPortpublic void setPort(int port) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EmbeddedLdapServerContainerThe embedded LDAP server port to connect to. Supplying 0 as the port indicates that a random available port should be selected.- Specified by:
- setPortin interface- EmbeddedLdapServerContainer
- Parameters:
- port- the port to connect to
 
- 
getPortpublic int getPort()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EmbeddedLdapServerContainerReturns the embedded LDAP server port.- Specified by:
- getPortin interface- EmbeddedLdapServerContainer
- Returns:
- the embedded LDAP server port
 
- 
getLocalPortpublic int getLocalPort()Deprecated, for removal: This API element is subject to removal in a future version.Returns the port that is resolved byTcpTransport.- Returns:
- the port that is resolved by TcpTransport
 
- 
setLdapOverSslEnabledpublic void setLdapOverSslEnabled(boolean ldapOverSslEnabled) Deprecated, for removal: This API element is subject to removal in a future version.If set totruewill enable LDAP over SSL (LDAPs). If set totruesetCertificatePassord(String)must be set as well.- Parameters:
- ldapOverSslEnabled- If not set, will default to false
 
- 
setKeyStoreFileDeprecated, for removal: This API element is subject to removal in a future version.The keyStore must not be null and must be a valid file. Will set the keyStore file on the underlyingLdapServer.- Parameters:
- keyStoreFile- Mandatory if LDAPs is enabled
 
- 
setCertificatePassordDeprecated, for removal: This API element is subject to removal in a future version.Will set the certificate password on the underlyingLdapServer.- Parameters:
- certificatePassord- May be null
 
- 
getServicepublic org.apache.directory.server.core.DefaultDirectoryService getService()Deprecated, for removal: This API element is subject to removal in a future version.
- 
startpublic void start()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- startin interface- org.springframework.context.Lifecycle
 
- 
stoppublic void stop()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- stopin interface- org.springframework.context.Lifecycle
 
- 
isRunningpublic boolean isRunning()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- isRunningin interface- org.springframework.context.Lifecycle
 
 
- 
UnboundIdContainerinstead because ApacheDS 1.x is no longer supported with no GA version to replace it.