public class ApacheDSContainer extends Object implements InitializingBean, DisposableBean, Lifecycle, ApplicationContextAware
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.
Constructor and Description |
---|
ApacheDSContainer(String root,
String ldifs) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.apache.directory.server.core.DefaultDirectoryService |
getService() |
boolean |
isRunning() |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setPort(int port) |
void |
setWorkingDirectory(File workingDir) |
void |
start() |
void |
stop() |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setWorkingDirectory(File workingDir)
public void setPort(int port)
public org.apache.directory.server.core.DefaultDirectoryService getService()