Class LdapManagementContextFactory
- java.lang.Object
-
- org.forgerock.opendj.config.dsconfig.LdapManagementContextFactory
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ManagementContextFactory
public final class LdapManagementContextFactory extends Object implements ManagementContextFactory
An LDAP management context factory for the DSConfig tool.
-
-
Constructor Summary
Constructors Constructor Description LdapManagementContextFactory(com.forgerock.opendj.cli.LdapClientProvider cfp)Creates a new LDAP management context factory based on LDAP client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the management context returned byManagementContextFactory.getManagementContext().ManagementContextgetManagementContext()Gets the management context which sub-commands should use in order to manage the directory server.
-
-
-
Method Detail
-
getManagementContext
public ManagementContext getManagementContext() throws com.forgerock.opendj.cli.ClientException
Description copied from interface:ManagementContextFactoryGets the management context which sub-commands should use in order to manage the directory server.The manangement context is created lazily, this method should always return the same management context instance.
- Specified by:
getManagementContextin interfaceManagementContextFactory- Returns:
- Returns the management context which sub-commands should use in order to manage the directory server.
- Throws:
com.forgerock.opendj.cli.ClientException- If the management context could not be created.
-
close
public void close()
Description copied from interface:ManagementContextFactoryCloses the management context returned byManagementContextFactory.getManagementContext().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceManagementContextFactory
-
-