Skip to content

Application bootstrap

Ahmad K. Bawaneh edited this page Nov 7, 2021 · 1 revision

The following is the order of things that happens during a Domino-mvp application startup :

  1. Configure submodules. this means every submodule entry point will be executed to configure the module as part of the application.
  2. The main frontend module entry point is executed in which we call ClientApp.make().run().
  3. The run can take an argument to register a handler that will be called to do further configuration
ClientApp.make().run(new ClientApp.DominoOptionsHandler() {
   @Override
   public void onBeforeRun(CanSetDominoOptions dominoOptions) {
       //do something here before going to next bootstrap step.
   }
});
  1. Call all simple startup tasks
  2. Call all async startup tasks.
  3. Call all routing tasks.
  4. Fire the MainDominoEvent.
  5. Call Application startup handler which can be set in the run method like this
ClientApp.make().run(new ClientApp.DominoOptionsHandler() {
            @Override
            public void onBeforeRun(CanSetDominoOptions dominoOptions) {
                dominoOptions.setApplicationStartHandler(() -> {

                });
            }
        });