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 void
close()
Closes the management context returned byManagementContextFactory.getManagementContext()
.ManagementContext
getManagementContext()
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: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
-
-