Class ProjectExecutor


  • public class ProjectExecutor
    extends Object
    Project executor.
    • Constructor Detail

      • ProjectExecutor

        public ProjectExecutor​(Project project,
                               String logPrefix,
                               List<String> appJvmArgs,
                               List<String> appArgs)
        Create an executor from a project.
        Parameters:
        project - The project.
        logPrefix - The log prefix.
        appJvmArgs - The application JVM arguments.
        appArgs - The application arguments.
    • Method Detail

      • project

        public Project project()
        Get project instance.
        Returns:
        The project.
      • start

        public void start()
        Start execution.
      • stop

        public void stop()
        Stop execution. Logs stopping message only if process does not stop quickly.
        Throws:
        IllegalStateException - If process does not stop before timeout.
      • stop

        public void stop​(boolean verbose)
        Stop execution.
        Parameters:
        verbose - true if should log all state changes.
        Throws:
        IllegalStateException - If process does not stop before timeout.
      • isRunning

        public boolean isRunning()
        Check if project is running.
        Returns:
        true if running.
      • hasStdOutMessage

        public boolean hasStdOutMessage()
        Check if project has printed to System.out.
        Returns:
        true if anything has been printed to System.out.
      • hasStdErrMessage

        public boolean hasStdErrMessage()
        Check if project has printed to System.err.
        Returns:
        true if anything has been printed to System.err.