public class

ApacheDSContainer

extends Object
implements DisposableBean InitializingBean ApplicationContextAware
java.lang.Object
   ↳ org.springframework.security.ldap.server.ApacheDSContainer

Class Overview

Provides lifecycle services for the embedded apacheDS server defined by the supplied configuration. Used by {code 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 and is not considered part of framework public API.

Summary

Public Constructors
ApacheDSContainer(String root, String ldifs)
Public Methods
void afterPropertiesSet()
void destroy()
DefaultDirectoryService getService()
boolean isRunning()
void setApplicationContext(ApplicationContext applicationContext)
void setPort(int port)
void setWorkingDirectory(File workingDir)
void start()
void stop()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.DisposableBean
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.context.ApplicationContextAware

Public Constructors

public ApacheDSContainer (String root, String ldifs)

Throws
Exception

Public Methods

public void afterPropertiesSet ()

Throws
Exception

public void destroy ()

Throws
Exception

public DefaultDirectoryService getService ()

public boolean isRunning ()

public void setApplicationContext (ApplicationContext applicationContext)

Throws
BeansException

public void setPort (int port)

public void setWorkingDirectory (File workingDir)

public void start ()

public void stop ()