Class Launcher

java.lang.Object
com.codingchili.core.Launcher
All Implemented Interfaces:
CoreDeployment, CoreService

public class Launcher extends Object implements CoreService
Launches all the components of the system on a single host. An application can be started using the `Launcher.main(args)` or `Launcher.start(context)`. The context provides more configuration options while the main can be used directly by passing the args from the main method.

Deploying a CoreService can also be done using the CoreContext.service(Supplier) methods. To avoid the Launcher entirely, create a new SystemContext and use the deployments method directly on that object.

  • Constructor Details

    • Launcher

      public Launcher(LaunchContext context)
      Creates a new launcher with the given launcher context.
      Parameters:
      context - the launcher context to use.
  • Method Details

    • main

      public static void main(String[] args)
      Starts the launcher with the given arguments.
      Parameters:
      args - specifies which commands the launcher will execute.
    • start

      public static void start(LaunchContext context)
      Starts the launcher with the given context.
      Parameters:
      context - contains the launcher args and settings.
    • instance

      public static Launcher instance()
      Returns:
      the launcher that started the application, null if not started using the default Launcher.
    • context

      public LaunchContext context()
      Returns:
      the launch context used to start the launcher, null if not started using the default launcher.