- 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.
@FunctionalInterface public interface Launcher extends Service
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:
@InjectSource private List<String> args;that contains the arguments, and launch by using one of the overloads that take an
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:
@InjectTarget private List<String> args;
For more info how to use services, check out the GitHub Wiki.
- Mordechai Meisels
void run(LaunchContext context)Called when the business application should be launched, after injection was performed (see
To do any initialization before injection, do it in the constructor, but be aware that unless you specify the launcher in the
launchersection 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.