Skip to content

Commit

Permalink
Add hook to prepare running of app
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Aug 16, 2024
1 parent b56b102 commit e47b55b
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,6 @@ public final CleanableApp<CR> createCleanableApp() {
return cleanableApp;
}

/**
* Called before running the application, i.e., invoking {@link #run()}
*/
public void prepareRun() {
// do nothing by default
}

/**
* Create a new {@code ConfiguredApp} that will be executed according to the given config.
*
Expand All @@ -281,6 +274,13 @@ protected void onApplicationStart() {
// do nothing by default
}

/**
* Called before running the application, i.e., invoking {@link #run()}
*/
public void prepareRun() {
// do nothing by default
}

private void startApplication() {
Runtime.getRuntime().addShutdownHook(new Thread(this::close));
this.onApplicationStart();
Expand Down

0 comments on commit e47b55b

Please sign in to comment.