Module org.update4j

Interface Launcher

All Superinterfaces:
Injectable, Service
All Known Implementing Classes:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

public interface Launcher
extends Service
An implementation of this interface can be used as an entry point to the business application.

If you wish to create your custom bootstrap but use the DefaultLauncher, you might pass over a list of strings that will be used as the arguments in main, by adding a field in the bootstrap:

 private List<String> args;
that contains the arguments, and launch by using one of the overloads that take an Injectable:

If the launcher is started by the DefaultBootstrap but you define your own launcher, you can capture the business command-line arguments by adding this field in the launcher:

 private List<String> args;

For more info how to use services, check out the GitHub Wiki.

Mordechai Meisels
  • Method Details

    • run

      void run​(LaunchContext context)
      Called when the business application should be launched, after injection was performed (see Configuration.launch(Injectable)) .

      To do any initialization before injection, do it in the constructor, but be aware that unless you specify the launcher in the launcher section of the configuration, the constructor might be called even if this provider will not be used in the end. This happens as the service loading mechanism first loads all providers and then compares versions to use the one with the highest version.

      context - Context information about the launch.