public final class LdapManagementContextFactory extends Object implements ManagementContextFactory
Constructor and Description |
---|
LdapManagementContextFactory(com.forgerock.opendj.cli.LdapClientProvider cfp)
Creates a new LDAP management context factory based on LDAP client.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the management context returned by
ManagementContextFactory.getManagementContext() . |
ManagementContext |
getManagementContext()
Gets the management context which sub-commands should use in order to manage the directory server.
|
public LdapManagementContextFactory(com.forgerock.opendj.cli.LdapClientProvider cfp)
cfp
- The LDAP client provider which should be used in this context.public ManagementContext getManagementContext() throws com.forgerock.opendj.cli.ClientException
ManagementContextFactory
The manangement context is created lazily, this method should always return the same management context instance.
getManagementContext
in interface ManagementContextFactory
com.forgerock.opendj.cli.ClientException
- If the management context could not be created.public void close()
ManagementContextFactory
ManagementContextFactory.getManagementContext()
.close
in interface Closeable
close
in interface AutoCloseable
close
in interface ManagementContextFactory
Copyright 2010-2018 ForgeRock AS.