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