Interface ManagementContextFactory
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
LdapManagementContextFactory
public interface ManagementContextFactory extends Closeable
A management context factory for the dsconfig tool.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the management context returned bygetManagementContext()
.ManagementContext
getManagementContext()
Gets the management context which sub-commands should use in order to manage the directory server.
-
-
-
Method Detail
-
getManagementContext
ManagementContext getManagementContext() throws com.forgerock.opendj.cli.ClientException
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.
- 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
void close() throws IOException
Closes the management context returned bygetManagementContext()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
- If an I/O error occurs when trying to close the management context.
-
-