Interface RunnableContainer

    • Method Detail

      • start

        void start()
        Starts the container. It blocks until the container is fully started unless it doesn't start before the timeout period in which case an exception will be thrown.
      • stop

        void stop()
        Stops the container. It blocks until the container is fully stopped unless it doesn't stop before the timeout period in which case an exception will be thrown.
      • restart

        void restart()
        Restarts the container. It blocks until the container is fully stopped (if it not already is) and then blocks until the container is fully started unless it doesn't start before the timeout period in which case an exception will be thrown.
      • setOutput

        void setOutput​(String output)
        Parameters:
        output - the file to which the container's output will be logged to. Note that we're passing a String instead of a File because we want to leave the possibility of using URIs for specifying the home location.
      • getOutput

        String getOutput()
        Returns:
        the file to which the container's output will be logged to. Note that we're returning a String instead of a File because we want to leave the possibility of using URIs for specifying the home location.
      • setTimeout

        void setTimeout​(long timeout)
        Parameters:
        timeout - the timeout (in ms) after which we consider the container cannot be started or stopped.
      • getTimeout

        long getTimeout()
        Returns:
        the timeout (in ms) after which we consider the container cannot be started or or stopped.
      • setAppend

        void setAppend​(boolean shouldAppend)
        Sets whether output of the container should be appended to an existing file, or the existing file should be truncated.
        Parameters:
        shouldAppend - Whether output should be appended to or not
      • isAppend

        boolean isAppend()
        Returns:
        true if the output of the container should be appended to the output file or false otherwise