Class EmbeddedOpenDJ

    • Constructor Detail

      • EmbeddedOpenDJ

        public EmbeddedOpenDJ()
      • EmbeddedOpenDJ

        public EmbeddedOpenDJ​(Config config)
    • Method Detail

      • getServerRootDirectory

        public File getServerRootDirectory()
        Returns the server root directory of this embedded instance.
        Returns:
        the server root directory
        Throws:
        IllegalStateException - If this instance has been closed, and the directory therefore deleted.
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • close

        public void close()
        Stops this instance, if it is still running, and deletes its temporary directory.

        This method is idempotent: it is also registered as a JVM shutdown hook.

        When the server cannot be stopped, this instance stays open and keeps its shutdown hook registered, so that a later call - or the hook at JVM exit - retries the stop.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
      • isRunning

        public boolean isRunning()