Module org.update4j

Interface Delegate

All Superinterfaces:
Injectable, Service
All Known Implementing Classes:
DefaultBootstrap
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 Delegate
extends Service
An implementation of this interface can be used as a delegate for a bootstrap application to be located by Bootstrap.

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

Author:
Mordechai Meisels
  • Method Summary

    Modifier and Type Method Description
    void main​(List<String> args)
    The bootstrap's main method, if you start it via the Bootstrap class or run update4j as a jar file.

    Methods inherited from interface Service

    version
  • Method Details

    • main

      void main​(List<String> args) throws Throwable
      The bootstrap's main method, if you start it via the Bootstrap class or run update4j as a jar file.

      This method is called after dependency injection was performed using any overload of Bootstrap.start() that takes an Injectable.

      To do any initialization before injection, do it in the constructor, but be aware that unless you specify the delegate with the --delegate flag, 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.

      Parameters:
      args - Command line arguments
      Throws:
      Throwable