java.lang.Object
io.jooby.run.JoobyRun
Allow to restart an application on file changes. This lets client to listen for file changes and
trigger a restart.
This class doesn't compile source code. Instead, let a client (Maven/Gradle) to listen for changes, fire a compilation process and restart the application once compilation finished.
- Since:
- 2.0.0
- Author:
- edgar
-
Constructor Summary
ConstructorsConstructorDescriptionJoobyRun(JoobyRunOptions options) Creates a new instances with the given options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddResource(Path path) Add the given path to the project classpath.booleanaddResource(Path path, BiConsumer<String, Path> callback) Add the given path to the project classpath.voidrestart()Restart the application.voidshutdown()Stop and shutdown the application.voidstart()Start the application.toString()
-
Constructor Details
-
JoobyRun
Creates a new instances with the given options.- Parameters:
options- Run options.
-
-
Method Details
-
addResource
Add the given path to the project classpath. Path must be a jar or file system directory. File system directory are listen for changes on file changes this method invokes the given callback.- Parameters:
path- Path.callback- Callback to listen for file changes.- Returns:
- True if the path was added it to the classpath.
-
addResource
Add the given path to the project classpath. Path must be a jar or file system directory.- Parameters:
path- Path.- Returns:
- True if the path was added it to the classpath.
-
start
Start the application.- Throws:
Throwable- If something goes wrong.
-
restart
public void restart()Restart the application. -
shutdown
public void shutdown()Stop and shutdown the application. -
toString
-