Class LdapManagementContextFactory
java.lang.Object
org.forgerock.opendj.config.dsconfig.LdapManagementContextFactory
- All Implemented Interfaces:
Closeable,AutoCloseable,ManagementContextFactory
An LDAP management context factory for the DSConfig tool.
-
Constructor Summary
ConstructorsConstructorDescriptionLdapManagementContextFactory(com.forgerock.opendj.cli.LdapClientProvider cfp) Creates a new LDAP management context factory based on LDAP client. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the management context returned byManagementContextFactory.getManagementContext().Gets the management context which sub-commands should use in order to manage the directory server.
-
Constructor Details
-
LdapManagementContextFactory
public LdapManagementContextFactory(com.forgerock.opendj.cli.LdapClientProvider cfp) Creates a new LDAP management context factory based on LDAP client.- Parameters:
cfp- The LDAP client provider which should be used in this context.
-
-
Method Details
-
getManagementContext
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
-