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 Details

    • 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 by getManagementContext().
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - If an I/O error occurs when trying to close the management context.