Module org.update4j
Package org.update4j

Class Bootstrap

Object
Bootstrap

public class Bootstrap extends Object
This class consists of convenience methods and the module's main method to locate and start the bootstrap application in Delegate Mode.
Author:
Mordechai Meisels
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
    The version of the current build of the framework.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main​(String[] args)
    The main method to start the bootstrap application in Delegate Mode from command-line.
    static void
    Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath.
    static void
    start​(String classname)
    Starts the bootstrap by locating the given class.
    static void
    start​(String classname, List<String> args)
    Starts the bootstrap by locating the given class, with the given list as command-line arguments.
    static void
    start​(String classname, List<String> args, Injectable injectable)
    Starts the bootstrap by locating the given class, with the given list as command-line arguments, with the provided injectable to exchange fields.
    static void
    start​(String classname, Injectable injectable)
    Starts the bootstrap by locating the given class, with the provided injectable to exchange fields.
    static void
    start​(List<String> args)
    Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath, with the given list as command-line arguments.
    static void
    start​(List<String> args, Injectable injectable)
    Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath, with the given list as command-line arguments, with the provided injectable to exchange fields.
    static void
    start​(Injectable injectable)
    Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath, with the provided injectable to exchange fields.
    static void
    start​(Delegate delegate)
    Starts the bootstrap running the given Delegate.
    static void
    start​(Delegate delegate, List<String> args)
    Starts the bootstrap running the given Delegate, with the given list as command-line arguments.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • main

      public static void main(String[] args) throws Throwable
      The main method to start the bootstrap application in Delegate Mode from command-line.

      Here's how you should run the application as a module:

       $ java --module-path . --module org.update4j
       
      Or in shorthand:
       $ java -p . -m org.update4j
       
      For more info consult Starting the Application

      By default it will try to locate the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath. You may use an explicit class by passing the class name using the --delegate flag as the first option:

       $ java --module-path . --module org.update4j --delegate com.example.MyDelegate
       
      Both --delegate and class name that follows will be removed from the argument list passed over to the delegate.

      The class name should be the Binary Class Name i.e. nested classes should use the $ sign. If the system cannot locate the passed class it fails.

      Throws:
      Throwable
    • start

      public static void start() throws Throwable
      Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(Injectable injectable) throws Throwable
      Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath, with the provided injectable to exchange fields.
      Parameters:
      injectable - An injectable to exchange fields with.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(String classname) throws Throwable
      Starts the bootstrap by locating the given class.

      The class name should be the Binary Class Name i.e. nested classes should use the $ sign. If the system cannot locate the passed class it fails.

      Parameters:
      classname - The class name of the delegate to load.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(String classname, List<String> args) throws Throwable
      Starts the bootstrap by locating the given class, with the given list as command-line arguments.

      The class name should be the Binary Class Name i.e. nested classes should use the $ sign. If the system cannot locate the passed class it fails.

      Parameters:
      classname - The class name of the delegate to load.
      args - The list of arguments to pass to the delegate.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(String classname, Injectable injectable) throws Throwable
      Starts the bootstrap by locating the given class, with the provided injectable to exchange fields.

      The class name should be the Binary Class Name i.e. nested classes should use the $ sign. If the system cannot locate the passed class it fails.

      Parameters:
      classname - The class name of the delegate to load.
      injectable - An injectable to exchange fields with.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(Delegate delegate) throws Throwable
      Starts the bootstrap running the given Delegate.
      Parameters:
      delegate - The delegate to run.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(List<String> args) throws Throwable
      Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath, with the given list as command-line arguments.
      Parameters:
      args - The list of arguments to pass to the delegate.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(List<String> args, Injectable injectable) throws Throwable
      Starts the bootstrap by locating the highest versioned provider of Delegate (specified by Service.version()) currently present in the classpath or modulepath, with the given list as command-line arguments, with the provided injectable to exchange fields.
      Parameters:
      args - The list of arguments to pass to the delegate.
      injectable - An injectable to exchange fields with.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(String classname, List<String> args, Injectable injectable) throws Throwable
      Starts the bootstrap by locating the given class, with the given list as command-line arguments, with the provided injectable to exchange fields.

      The class name should be the Binary Class Name i.e. nested classes should use the $ sign. If the system cannot locate the passed class it fails.

      Parameters:
      classname - The class name of the delegate to load.
      args - The list of arguments to pass to the delegate.
      injectable - An injectable to exchange fields with.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.
    • start

      public static void start(Delegate delegate, List<String> args) throws Throwable
      Starts the bootstrap running the given Delegate, with the given list as command-line arguments.
      Parameters:
      delegate - The delegate to run.
      args - The list of arguments to pass to the delegate.
      Throws:
      Throwable - Any throwable thrown in the bootstrap.