Package io.helidon.build.dev.mode
Class ProjectExecutor
- java.lang.Object
-
- io.helidon.build.dev.mode.ProjectExecutor
-
public class ProjectExecutor extends Object
Project executor.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasStdErrMessage()Check if project has printed toSystem.err.booleanisRunning()Check if project is running.Projectproject()Get project instance.booleanshouldExit()Check if project has printed a message toSystem.errthat requires the loop to exit.voidstart()Start execution.voidstop()Stop execution.voidstop(boolean verbose)Stop execution.
-
-
-
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-trueif should log all state changes.- Throws:
IllegalStateException- If process does not stop before timeout.
-
isRunning
public boolean isRunning()
Check if project is running.- Returns:
trueif running.
-
shouldExit
public boolean shouldExit()
Check if project has printed a message toSystem.errthat requires the loop to exit.- Returns:
trueif exit is required.
-
hasStdErrMessage
public boolean hasStdErrMessage()
Check if project has printed toSystem.err.- Returns:
trueif anything has been printed toSystem.err.
-
-