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
ConstructorDescriptionLdapManagementContextFactory
(com.forgerock.opendj.cli.LdapClientProvider cfp) Creates a new LDAP management context factory based on LDAP client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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:ManagementContextFactory
Gets 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:
getManagementContext
in 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:ManagementContextFactory
Closes the management context returned byManagementContextFactory.getManagementContext()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceManagementContextFactory
-